Make sure compose build tests run with SELinux in enforcing mode

Related: rhbz#1645189
This commit is contained in:
Jiri Kortus 2019-01-25 17:53:50 +01:00 committed by Alexander Todorov
parent 7d4a9ca0b1
commit e019ec2822
6 changed files with 7 additions and 0 deletions

View File

@ -71,6 +71,7 @@ __EOF__
rlPhaseEnd
rlPhaseStartTest "compose start"
rlAssertEquals "SELinux operates in enforcing mode" "$(getenforce)" "Enforcing"
UUID=`$CLI compose start example-http-server ami`
rlAssertEquals "exit code should be zero" $? 0

View File

@ -56,6 +56,7 @@ rlJournalStart
rlPhaseEnd
rlPhaseStartTest "compose start"
rlAssertEquals "SELinux operates in enforcing mode" "$(getenforce)" "Enforcing"
UUID=`$CLI compose start example-http-server vhd`
rlAssertEquals "exit code should be zero" $? 0

View File

@ -44,6 +44,8 @@ rlJournalStart
rlPhaseEnd
rlPhaseStartTest "compose start"
rlAssertEquals "SELinux operates in enforcing mode" "$(getenforce)" "Enforcing"
# workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1639326
cat > $TMP_DIR/http-with-rng.toml << __EOF__
name = "http-with-rng"

View File

@ -64,6 +64,7 @@ rlJournalStart
rlPhaseEnd
rlPhaseStartTest "compose start"
rlAssertEquals "SELinux operates in enforcing mode" "$(getenforce)" "Enforcing"
SSH_KEY_DIR=`mktemp -d /tmp/composer-ssh-keys.XXXXXX`
rlRun -t -c "ssh-keygen -t rsa -N '' -f $SSH_KEY_DIR/id_rsa"
PUB_KEY=`cat $SSH_KEY_DIR/id_rsa.pub`

View File

@ -16,6 +16,7 @@ CLI="./src/bin/composer-cli"
rlJournalStart
rlPhaseStartTest "compose start"
rlAssertEquals "SELinux operates in enforcing mode" "$(getenforce)" "Enforcing"
UUID=`$CLI compose start example-http-server ext4-filesystem`
rlAssertEquals "exit code should be zero" $? 0

View File

@ -16,6 +16,7 @@ CLI="./src/bin/composer-cli"
rlJournalStart
rlPhaseStartTest "compose start"
rlAssertEquals "SELinux operates in enforcing mode" "$(getenforce)" "Enforcing"
UUID=`$CLI compose start example-http-server partitioned-disk`
rlAssertEquals "exit code should be zero" $? 0