Make sure compose build tests run with SELinux in enforcing mode
Related: rhbz#1654795
This commit is contained in:
parent
47fd6e85b2
commit
56d0e704c0
@ -72,6 +72,7 @@ __EOF__
|
|||||||
rlPhaseEnd
|
rlPhaseEnd
|
||||||
|
|
||||||
rlPhaseStartTest "compose start"
|
rlPhaseStartTest "compose start"
|
||||||
|
rlAssertEquals "SELinux operates in enforcing mode" "$(getenforce)" "Enforcing"
|
||||||
UUID=`$CLI compose start example-http-server ami`
|
UUID=`$CLI compose start example-http-server ami`
|
||||||
rlAssertEquals "exit code should be zero" $? 0
|
rlAssertEquals "exit code should be zero" $? 0
|
||||||
|
|
||||||
|
@ -57,6 +57,7 @@ rlJournalStart
|
|||||||
rlPhaseEnd
|
rlPhaseEnd
|
||||||
|
|
||||||
rlPhaseStartTest "compose start"
|
rlPhaseStartTest "compose start"
|
||||||
|
rlAssertEquals "SELinux operates in enforcing mode" "$(getenforce)" "Enforcing"
|
||||||
UUID=`$CLI compose start example-http-server vhd`
|
UUID=`$CLI compose start example-http-server vhd`
|
||||||
rlAssertEquals "exit code should be zero" $? 0
|
rlAssertEquals "exit code should be zero" $? 0
|
||||||
|
|
||||||
|
@ -45,6 +45,8 @@ rlJournalStart
|
|||||||
rlPhaseEnd
|
rlPhaseEnd
|
||||||
|
|
||||||
rlPhaseStartTest "compose start"
|
rlPhaseStartTest "compose start"
|
||||||
|
rlAssertEquals "SELinux operates in enforcing mode" "$(getenforce)" "Enforcing"
|
||||||
|
|
||||||
# workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1639326
|
# workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1639326
|
||||||
cat > $TMP_DIR/http-with-rng.toml << __EOF__
|
cat > $TMP_DIR/http-with-rng.toml << __EOF__
|
||||||
name = "http-with-rng"
|
name = "http-with-rng"
|
||||||
|
@ -65,6 +65,7 @@ rlJournalStart
|
|||||||
rlPhaseEnd
|
rlPhaseEnd
|
||||||
|
|
||||||
rlPhaseStartTest "compose start"
|
rlPhaseStartTest "compose start"
|
||||||
|
rlAssertEquals "SELinux operates in enforcing mode" "$(getenforce)" "Enforcing"
|
||||||
SSH_KEY_DIR=`mktemp -d /tmp/composer-ssh-keys.XXXXXX`
|
SSH_KEY_DIR=`mktemp -d /tmp/composer-ssh-keys.XXXXXX`
|
||||||
rlRun -t -c "ssh-keygen -t rsa -N '' -f $SSH_KEY_DIR/id_rsa"
|
rlRun -t -c "ssh-keygen -t rsa -N '' -f $SSH_KEY_DIR/id_rsa"
|
||||||
PUB_KEY=`cat $SSH_KEY_DIR/id_rsa.pub`
|
PUB_KEY=`cat $SSH_KEY_DIR/id_rsa.pub`
|
||||||
|
@ -16,6 +16,7 @@ CLI="./src/bin/composer-cli"
|
|||||||
|
|
||||||
rlJournalStart
|
rlJournalStart
|
||||||
rlPhaseStartTest "compose start"
|
rlPhaseStartTest "compose start"
|
||||||
|
rlAssertEquals "SELinux operates in enforcing mode" "$(getenforce)" "Enforcing"
|
||||||
UUID=`$CLI compose start example-http-server ext4-filesystem`
|
UUID=`$CLI compose start example-http-server ext4-filesystem`
|
||||||
rlAssertEquals "exit code should be zero" $? 0
|
rlAssertEquals "exit code should be zero" $? 0
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@ CLI="./src/bin/composer-cli"
|
|||||||
|
|
||||||
rlJournalStart
|
rlJournalStart
|
||||||
rlPhaseStartTest "compose start"
|
rlPhaseStartTest "compose start"
|
||||||
|
rlAssertEquals "SELinux operates in enforcing mode" "$(getenforce)" "Enforcing"
|
||||||
UUID=`$CLI compose start example-http-server partitioned-disk`
|
UUID=`$CLI compose start example-http-server partitioned-disk`
|
||||||
rlAssertEquals "exit code should be zero" $? 0
|
rlAssertEquals "exit code should be zero" $? 0
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user