diff options
Diffstat (limited to 'test')
-rwxr-xr-x | test/compose/test-compose | 8 | ||||
-rw-r--r-- | test/system/005-info.bats | 21 |
2 files changed, 28 insertions, 1 deletions
diff --git a/test/compose/test-compose b/test/compose/test-compose index 704c71a9f..7693041ac 100755 --- a/test/compose/test-compose +++ b/test/compose/test-compose @@ -163,7 +163,13 @@ function test_port() { local op="$2" # '=' or '~' local expect="$3" # what to expect from curl output - local actual=$(curl --retry 10 --retry-all-errors -s http://127.0.0.1:$port/) + local actual=$(curl --retry 3 --retry-all-errors -s http://127.0.0.1:$port/) + # The test is flaking with an empty result. The curl retry doesn't solve this. + # If the result is empty sleep one second and try again. + if [[ "$actual" == "" ]]; then + sleep 1 + local actual=$(curl --retry 3 --retry-all-errors -s http://127.0.0.1:$port/) + fi local curl_rc=$? if [ $curl_rc -ne 0 ]; then _show_ok 0 "$testname - curl failed with status $curl_rc" diff --git a/test/system/005-info.bats b/test/system/005-info.bats index c0af2e937..ed341dd17 100644 --- a/test/system/005-info.bats +++ b/test/system/005-info.bats @@ -53,6 +53,27 @@ store.imageStore.number | 1 } +# 2021-04-06 discussed in watercooler: RHEL must never use crun, even if +# using cgroups v2. +@test "podman info - RHEL8 must use runc" { + local osrelease=/etc/os-release + test -e $osrelease || skip "Not a RHEL system (no $osrelease)" + + local osname=$(source $osrelease; echo $NAME) + if [[ $osname =~ Red.Hat || $osname =~ CentOS ]]; then + # Version can include minor; strip off first dot an all beyond it + local osver=$(source $osrelease; echo $VERSION_ID) + test ${osver%%.*} -le 8 || skip "$osname $osver > RHEL8" + + # RHEL or CentOS 8. + # FIXME: what does 'CentOS 8' even mean? What is $VERSION_ID in CentOS? + run_podman info --format '{{.Host.OCIRuntime.Name}}' + is "$output" "runc" "$osname only supports OCI Runtime = runc" + else + skip "only applicable on RHEL, this is $osname" + fi +} + @test "podman info --storage-opt='' " { skip_if_remote "--storage-opt flag is not supported for remote" skip_if_rootless "storage opts are required for rootless running" |