mirror of
https://github.com/containers/podman.git
synced 2025-10-18 19:53:58 +08:00
Merge pull request #25918 from ricardobranco777/test_runc_namespaces
test: Fix expected output for runc on namespaces
This commit is contained in:
@ -38,7 +38,13 @@ uts | uts
|
|||||||
run_podman logs $cname
|
run_podman logs $cname
|
||||||
con1_ns="$output"
|
con1_ns="$output"
|
||||||
|
|
||||||
assert "$con1_ns" == "$con2_ns" "($name) namespace matches (type: $type)"
|
if [[ "$option" = "pid" ]] && is_rootless && ! is_remote && [[ "$(podman_runtime)" = "runc" ]]; then
|
||||||
|
# Replace "pid:[1234567]" with "pid:\[1234567\]"
|
||||||
|
con1_ns_esc="${con1_ns//[\[\]]/\\&}"
|
||||||
|
assert "$con2_ns" =~ "${con1_ns_esc}.*warning .*" "($name) namespace matches (type: $type)"
|
||||||
|
else
|
||||||
|
assert "$con1_ns" == "$con2_ns" "($name) namespace matches (type: $type)"
|
||||||
|
fi
|
||||||
local matcher="=="
|
local matcher="=="
|
||||||
if [[ "$type" != "host" ]]; then
|
if [[ "$type" != "host" ]]; then
|
||||||
matcher="!="
|
matcher="!="
|
||||||
|
Reference in New Issue
Block a user