Fix sanity test suite

Fix sanity test to pass on Fedora Rawhide and Fedora 30. Changes are
related to missing 'nc' command in container for which SELinux policy is
generated.
This commit is contained in:
Lukas Vrabec 2019-08-27 20:58:23 +02:00
parent c78730bf59
commit 10b87117f0
No known key found for this signature in database
GPG Key ID: 47201AC42F29CE06

View File

@ -51,12 +51,13 @@ rlJournalStart
rlRun "podman exec test ls /home" 1,2 rlRun "podman exec test ls /home" 1,2
rlRun "podman exec test touch /var/spool/test" 1 rlRun "podman exec test touch /var/spool/test" 1
rlRun "podman exec test dnf install nmap-ncat -y" 0
rlWatchdog "rlRun \"podman exec test nc -l 53\"" 3 rlWatchdog "rlRun \"podman exec test nc -l 53\"" 3
CONT_ID=$(podman ps | grep test | cut -d ' ' -f 1) CONT_ID=$(podman ps | grep test | cut -d ' ' -f 1)
rlRun "podman inspect $CONT_ID | udica my_container >$OUTPUT_FILE" rlRun "podman inspect $CONT_ID | udica my_container >$OUTPUT_FILE"
rlRun "podman stop test" rlRun "podman stop test"
rlRun "podman rm test" rlRun "podman rm --force test"
rlRun "cat $OUTPUT_FILE" rlRun "cat $OUTPUT_FILE"
rlAssertExists "my_container.cil" rlAssertExists "my_container.cil"
@ -71,10 +72,11 @@ rlJournalStart
rlRun "podman exec test2 ls /home" 0 rlRun "podman exec test2 ls /home" 0
rlRun "podman exec test2 touch /var/spool/test" 0 rlRun "podman exec test2 touch /var/spool/test" 0
rlWatchdog "rlRun \"podman exec test2 nc -l 53\" 1" 3 rlRun "podman exec test2 dnf install nmap-ncat -y" 0
rlWatchdog "rlRun \"podman exec test2 nc -l 53\" 2" 3
rlRun "podman stop test2" rlRun "podman stop test2"
rlRun "podman rm test2" rlRun "podman rm --force test2"
rlRun "semodule -r my_container base_container net_container home_container" rlRun "semodule -r my_container base_container net_container home_container"
rlRun "rm my_container.cil" rlRun "rm my_container.cil"