Skip to content

Commit 3e774ee

Browse files
committed
test/system: actually wait for container removal
podman wait by default waits for exit not removal as the man page documents. Fixes: 3a98b6d ("test: Wait for killed container to avoid leak") Signed-off-by: Paul Holzinger <[email protected]>
1 parent fdb5ac5 commit 3e774ee

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/system/130-kill.bats

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,9 @@ load helpers
114114
run_podman run --rm -d --name $cname $IMAGE top
115115
run_podman kill $cname
116116
is "$output" $cname
117-
run_podman '?' wait $cname
117+
# Wait for the container to get removed to avoid the leak check from triggering,
118+
# since it might have already been removed here ignore the exit code check.
119+
run_podman '?' wait --condition=removing $cname
118120
}
119121

120122
# bats test_tags=ci:parallel

0 commit comments

Comments
 (0)