diff --git a/policycoreutils/sepolicy-generate/runtest.sh b/policycoreutils/sepolicy-generate/runtest.sh index e51e519..f79213f 100755 --- a/policycoreutils/sepolicy-generate/runtest.sh +++ b/policycoreutils/sepolicy-generate/runtest.sh @@ -106,16 +106,10 @@ rlJournalStart rlRun "rm -rf mypolicy" rlPhaseEnd - rlPhaseStartTest "sepolicy manpage --web, bz1854639" - rlRun "sepolicy manpage --web -d zebra_t" - rlRun "ls /tmp/*release*" 0 "Html file with OS name exists." - rlRun "cat /tmp/*release* > /tmp/testfile" - rlAssertGrep "href=zebra.html" "/tmp/testfile" - rlPhaseEnd - rlPhaseStartCleanup rlRun "popd" rlRun "rm -r $TmpDir" 0 "Removing tmp directory" rlPhaseEnd rlJournalPrintText rlJournalEnd + diff --git a/policycoreutils/sepolicy-manpage/main.fmf b/policycoreutils/sepolicy-manpage/main.fmf new file mode 100644 index 0000000..eae4499 --- /dev/null +++ b/policycoreutils/sepolicy-manpage/main.fmf @@ -0,0 +1,19 @@ +summary: sepolicy manpage sanity test +description: Does the sepolicy manpage command work correctly? +contact: Milos Malik +component: + - policycoreutils +framework: beakerlib +recommend: + - /usr/bin/sepolicy +duration: 10m +enabled: true +tier: 3 +link: + - verifies: https://bugzilla.redhat.com/show_bug.cgi?id=1854639 + - verifies: https://bugzilla.redhat.com/show_bug.cgi?id=1989840 +adjust: + - enabled: false + when: distro == rhel-4, rhel-5, rhel-6 + because: the sepolicy command is not available there + diff --git a/policycoreutils/sepolicy-manpage/runtest.sh b/policycoreutils/sepolicy-manpage/runtest.sh new file mode 100755 index 0000000..32c12a3 --- /dev/null +++ b/policycoreutils/sepolicy-manpage/runtest.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +rlJournalStart + rlPhaseStartSetup + rlRun "rpm -qa | grep policycoreutils" + rlPhaseEnd + + rlPhaseStartTest "sepolicy manpage --web, bz#1854639 + bz#1989840" + rlRun "sepolicy manpage --web -d zebra_t" + if rlIsRHEL 7 8 ; then + rlRun "ls -l /tmp/*release*" 0 "Html file with OS name exists." + rlRun "cat /tmp/*release* > /tmp/testfile" + else + rlRun "ls -l /tmp/index.html" 0 "HTML file exists" + rlRun "cat /tmp/index.html > /tmp/testfile" + fi + rlAssertGrep "href=zebra.html" "/tmp/testfile" + rlRun "ls -l /tmp/zebra.html" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "rm -f /tmp/zebra* /tmp/index.html /tmp/*release*" + rlPhaseEnd +rlJournalEnd +