test if sepolicy manpage can generate manpage in HTML form
The sepolicy tool can generate man pages for specific SELinux domains. When the sepolicy tool was instructed to generate man pages in HTML form (--web), the generated HTML files were very incomplete. The TC reproduces the situation. The newly added TC checks if the sepolicy manpage command works correctly. The checks related to the sepolicy manpage command were removed from the sepolicy-generate TC. The TC covers BZ#1989840.
This commit is contained in:
parent
ad7293e725
commit
b6ec2fee8d
3 changed files with 47 additions and 7 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
19
policycoreutils/sepolicy-manpage/main.fmf
Normal file
19
policycoreutils/sepolicy-manpage/main.fmf
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
summary: sepolicy manpage sanity test
|
||||
description: Does the sepolicy manpage command work correctly?
|
||||
contact: Milos Malik <mmalik@redhat.com>
|
||||
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
|
||||
|
||||
27
policycoreutils/sepolicy-manpage/runtest.sh
Executable file
27
policycoreutils/sepolicy-manpage/runtest.sh
Executable file
|
|
@ -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
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue