Skip to content

Commit

Permalink
Merge pull request containers#20846 from edsantiago/gating_fixes
Browse files Browse the repository at this point in the history
[v4.8] Gating test fixes
  • Loading branch information
openshift-merge-bot[bot] authored Nov 30, 2023
2 parents 0f81579 + a7c522d commit 78fdb40
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
3 changes: 3 additions & 0 deletions test/system/030-run.bats
Original file line number Diff line number Diff line change
Expand Up @@ -1154,6 +1154,9 @@ EOF
if is_rootless; then
run ulimit -c -H
max=$output
if [[ "$max" != "unlimited" ]] && [[ $max -lt 1000 ]]; then
skip "ulimit -c == $max, test requires >= 1000"
fi
fi

run_podman run --ulimit core=-1:-1 --rm $IMAGE grep core /proc/self/limits
Expand Down
21 changes: 18 additions & 3 deletions test/system/272-system-connection.bats
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@ $c2[ ]\+tcp://localhost:54321[ ]\+true" \
# 3. ActiveService from containers.conf
# 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
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
Expand Down Expand Up @@ -232,9 +236,20 @@ $c2[ ]\+tcp://localhost:54321[ ]\+true" \
run_podman system connection rm env-override
run_podman system connection rm cli-override

_run_podman_remote 125 --remote ps
assert "$output" =~ "/run/[a-z0-9/]*podman/podman.sock"\
"test absence of default connection"
# 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
assert "$output" =~ "/run/[a-z0-9/]*podman/podman.sock"\
"test absence of default connection"
fi
}

# vim: filetype=sh

0 comments on commit 78fdb40

Please sign in to comment.