mirror of https://github.com/containers/podman.git
Merge pull request #14338 from vrothberg/flakes
system tests: fix flake waiting for container to run
This commit is contained in:
commit
d069ad1082
|
@ -397,25 +397,25 @@ function _ensure_pod_state() {
|
||||||
for i in {0..5}; do
|
for i in {0..5}; do
|
||||||
run_podman pod inspect $1 --format "{{.State}}"
|
run_podman pod inspect $1 --format "{{.State}}"
|
||||||
if [[ $output == "$2" ]]; then
|
if [[ $output == "$2" ]]; then
|
||||||
break
|
return
|
||||||
fi
|
fi
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
done
|
done
|
||||||
|
|
||||||
is "$output" "$2" "unexpected pod state"
|
die "Timed out waiting for pod $1 to enter state $2"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Wait for the container's (1st arg) running state (2nd arg)
|
# Wait for the container's (1st arg) running state (2nd arg)
|
||||||
function _ensure_container_running() {
|
function _ensure_container_running() {
|
||||||
for i in {0..5}; do
|
for i in {0..20}; do
|
||||||
run_podman container inspect $1 --format "{{.State.Running}}"
|
run_podman container inspect $1 --format "{{.State.Running}}"
|
||||||
if [[ $output == "$2" ]]; then
|
if [[ $output == "$2" ]]; then
|
||||||
break
|
return
|
||||||
fi
|
fi
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
done
|
done
|
||||||
|
|
||||||
is "$output" "$2" "unexpected pod state"
|
die "Timed out waiting for container $1 to enter state running=$2"
|
||||||
}
|
}
|
||||||
|
|
||||||
###########################
|
###########################
|
||||||
|
|
Loading…
Reference in New Issue