Skip to content

Commit

Permalink
fix network restart always test
Browse files Browse the repository at this point in the history
The added test in 30544f2 is flaking. Podman inspect is always
working so we have to check the pid instead.

Signed-off-by: Paul Holzinger <[email protected]>
  • Loading branch information
Paul Holzinger committed May 12, 2021
1 parent 59dd357 commit fa6b6b8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/system/500-networking.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fa6b6b8

Please sign in to comment.