summaryrefslogtreecommitdiff
path: root/test/system
diff options
context:
space:
mode:
Diffstat (limited to 'test/system')
-rw-r--r--test/system/005-info.bats21
-rw-r--r--test/system/500-networking.bats15
2 files changed, 36 insertions, 0 deletions
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"
diff --git a/test/system/500-networking.bats b/test/system/500-networking.bats
index 804dd46b1..cda054b15 100644
--- a/test/system/500-networking.bats
+++ b/test/system/500-networking.bats
@@ -209,4 +209,19 @@ load helpers
run_podman rm -f $cid
}
+@test "podman rootless cni adds /usr/sbin to PATH" {
+ is_rootless || skip "only meaningful for rootless"
+
+ local mynetname=testnet-$(random_string 10)
+ run_podman network create $mynetname
+
+ # Test that rootless cni adds /usr/sbin to $PATH
+ # iptables is located under /usr/sbin and is needed for the CNI plugins.
+ # Debian doesn't add /usr/sbin to $PATH for rootless users so we have to add it.
+ PATH=/usr/local/bin:/usr/bin run_podman run --rm --network $mynetname $IMAGE ip addr
+ is "$output" ".*eth0.*" "Interface eth0 not found in ip addr output"
+
+ run_podman network rm -f $mynetname
+}
+
# vim: filetype=sh