mirror of
https://github.com/containers/podman.git
synced 2025-06-21 17:38:12 +08:00
Gating test fixes
Two newly-added tests, fail in gating: - system connection: difference in how sockets are set up between CI and gating - ulimit: gating seems to run with ulimit -c -H 0. Check, and skip if ulimit is less than what we need Signed-off-by: Ed Santiago <santiago@redhat.com>
This commit is contained in:
@ -1159,6 +1159,9 @@ EOF
|
|||||||
if is_rootless; then
|
if is_rootless; then
|
||||||
run ulimit -c -H
|
run ulimit -c -H
|
||||||
max=$output
|
max=$output
|
||||||
|
if [[ "$max" != "unlimited" ]] && [[ $max -lt 1000 ]]; then
|
||||||
|
skip "ulimit -c == $max, test requires >= 1000"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
run_podman run --ulimit core=-1:-1 --rm $IMAGE grep core /proc/self/limits
|
run_podman run --ulimit core=-1:-1 --rm $IMAGE grep core /proc/self/limits
|
||||||
|
@ -187,6 +187,10 @@ $c2[ ]\+tcp://localhost:54321[ ]\+true" \
|
|||||||
# 3. ActiveService from containers.conf
|
# 3. ActiveService from containers.conf
|
||||||
# 4. RemoteURI
|
# 4. RemoteURI
|
||||||
|
|
||||||
|
# Prerequisite check: there must be no defined system connections
|
||||||
|
run_podman system connection ls -q
|
||||||
|
assert "$output" = "" "This test requires an empty list of system connections"
|
||||||
|
|
||||||
# setup
|
# setup
|
||||||
run_podman 0+w system connection add defaultconnection unix:///run/user/defaultconnection/podman/podman.sock
|
run_podman 0+w system connection add defaultconnection unix:///run/user/defaultconnection/podman/podman.sock
|
||||||
run_podman 0+w system connection add env-override unix:///run/user/env-override/podman/podman.sock
|
run_podman 0+w system connection add env-override unix:///run/user/env-override/podman/podman.sock
|
||||||
@ -232,9 +236,20 @@ $c2[ ]\+tcp://localhost:54321[ ]\+true" \
|
|||||||
run_podman system connection rm env-override
|
run_podman system connection rm env-override
|
||||||
run_podman system connection rm cli-override
|
run_podman system connection rm cli-override
|
||||||
|
|
||||||
|
# With all system connections removed, test the default connection.
|
||||||
|
# This only works in upstream CI, where we run with a nonstandard socket.
|
||||||
|
# In gating we use the default /run/...
|
||||||
|
run_podman info --format '{{.Host.RemoteSocket.Path}}'
|
||||||
|
local sock="$output"
|
||||||
|
if [[ "$sock" =~ //run/ ]]; then
|
||||||
|
_run_podman_remote --remote info --format '{{.Host.RemoteSocket.Path}}'
|
||||||
|
assert "$output" = "$sock" "podman-remote is using default socket path"
|
||||||
|
else
|
||||||
|
# Nonstandard socket
|
||||||
_run_podman_remote 125 --remote ps
|
_run_podman_remote 125 --remote ps
|
||||||
assert "$output" =~ "/run/[a-z0-9/]*podman/podman.sock"\
|
assert "$output" =~ "/run/[a-z0-9/]*podman/podman.sock"\
|
||||||
"test absence of default connection"
|
"test absence of default connection"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# vim: filetype=sh
|
# vim: filetype=sh
|
||||||
|
Reference in New Issue
Block a user