fix network restart always test

The added test in 30544f225e is flaking. Podman inspect is always
working so we have to check the pid instead.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
This commit is contained in:
Paul Holzinger 2021-05-12 11:27:39 +02:00
parent 59dd357509
commit fa6b6b873f

View file

@ -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