mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-10-13 17:37:42 +00:00
test/system: fix flaky "podman-remote: non-default connection" test
The test was failing intermittently when run under `make remotesystem`
because the remotesystem test harness sets PODMAN_SOCKET in the
environment. After removing all named connections, the test expected
`podman-remote --remote ps` to fail with exit code 125, but it
succeeded (exit 0) by falling back to the PODMAN_SOCKET environment
variable.
Fix by unsetting PODMAN_SOCKET in a subshell before testing for
absence of default connection, ensuring the test works correctly
in both local and remotesystem environments.
Partial cherry-pick of commit feb36e4fe6
("Implement TLS API Support"), extracting only the test fix portion.
Signed-off-by: Lokesh Mandvekar <lsm5@redhat.com>
This commit is contained in:
parent
fedda4a758
commit
fbeee68b18
1 changed files with 8 additions and 3 deletions
|
|
@ -232,9 +232,14 @@ $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"
|
||||
# Test absence of default connection
|
||||
# Unset PODMAN_SOCKET to avoid false positives when running under remotesystem
|
||||
(
|
||||
unset PODMAN_SOCKET
|
||||
_run_podman_remote 125 --remote ps
|
||||
assert "$output" =~ "/run/[a-z0-9/]*podman/podman.sock"\
|
||||
"test absence of default connection"
|
||||
)
|
||||
}
|
||||
|
||||
# vim: filetype=sh
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue