Sanity/oscap-version: basic test to check that oscap prints its version
This commit is contained in:
parent
a7bfa47ad7
commit
ed97b76675
2 changed files with 55 additions and 0 deletions
8
Sanity/oscap-version/main.fmf
Normal file
8
Sanity/oscap-version/main.fmf
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
summary: openscap prints version
|
||||
description: 'Checks that openscap prints its version'
|
||||
contact: Matus Marhefka <mmarhefk@redhat.com>
|
||||
duration: 5m
|
||||
tier: 1
|
||||
recommend:
|
||||
- openscap
|
||||
- openscap-scanner
|
||||
47
Sanity/oscap-version/runtest.sh
Executable file
47
Sanity/oscap-version/runtest.sh
Executable file
|
|
@ -0,0 +1,47 @@
|
|||
#!/bin/bash
|
||||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /tools/openscap/Sanity/oscap-version
|
||||
# Description: Checks that openscap prints its version.
|
||||
# Author: Matus Marhefka <mmarhefk@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2020 Red Hat, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be
|
||||
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
# PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
# Include Beaker environment
|
||||
. /usr/bin/rhts-environment.sh || exit 1
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
PACKAGE="openscap"
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlAssertRpm $PACKAGE
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlRun "oscap --version | head -n1 | grep \"[0-9]\+\.[0-9]\+\.[0-9]\+\"" \
|
||||
0 "openscap prints its version on the first line"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
Loading…
Add table
Add a link
Reference in a new issue