From fa6b6b873f2bb8ca76c6711188eac669d14bf3c2 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Wed, 12 May 2021 11:27:39 +0200 Subject: fix network restart always test The added test in 30544f225e73 is flaking. Podman inspect is always working so we have to check the pid instead. Signed-off-by: Paul Holzinger --- test/system/500-networking.bats | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/system/500-networking.bats b/test/system/500-networking.bats index 94980346e..34220829a 100644 --- a/test/system/500-networking.bats +++ b/test/system/500-networking.bats @@ -88,8 +88,9 @@ load helpers # Wait for container to restart retries=20 while :;do - run_podman '?' container inspect --format "{{.State.Pid}}" myweb - if [[ $status -eq 0 ]]; then + run_podman container inspect --format "{{.State.Pid}}" myweb + # pid is 0 as long as the container is not running + if [[ $output -ne 0 ]]; then if [[ $output == $pid ]]; then die "This should never happen! Restarted container has same PID ($output) as killed one!" fi -- cgit v1.2.3-54-g00ecf