diff options
author | Paul Holzinger <paul.holzinger@web.de> | 2021-05-12 11:27:39 +0200 |
---|---|---|
committer | Paul Holzinger <paul.holzinger@web.de> | 2021-05-12 11:27:39 +0200 |
commit | fa6b6b873f2bb8ca76c6711188eac669d14bf3c2 (patch) | |
tree | 078d5aa0ed6ee79ec7249d0a61b923232c2e084c | |
parent | 59dd35750931547c66e34e999ab960c90f18f510 (diff) | |
download | podman-fa6b6b873f2bb8ca76c6711188eac669d14bf3c2.tar.gz podman-fa6b6b873f2bb8ca76c6711188eac669d14bf3c2.tar.bz2 podman-fa6b6b873f2bb8ca76c6711188eac669d14bf3c2.zip |
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 <paul.holzinger@web.de>
-rw-r--r-- | test/system/500-networking.bats | 5 |
1 files changed, 3 insertions, 2 deletions
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 |