diff options
Diffstat (limited to 'test/system/helpers.bash')
-rw-r--r-- | test/system/helpers.bash | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/system/helpers.bash b/test/system/helpers.bash index 138d668f4..6868f2691 100644 --- a/test/system/helpers.bash +++ b/test/system/helpers.bash @@ -392,6 +392,32 @@ function pause_image() { echo "localhost/podman-pause:$output" } +# Wait for the pod (1st arg) to transition into the state (2nd arg) +function _ensure_pod_state() { + for i in {0..5}; do + run_podman pod inspect $1 --format "{{.State}}" + if [[ $output == "$2" ]]; then + break + fi + sleep 0.5 + done + + is "$output" "$2" "unexpected pod state" +} + +# Wait for the container's (1st arg) running state (2nd arg) +function _ensure_container_running() { + for i in {0..5}; do + run_podman container inspect $1 --format "{{.State.Running}}" + if [[ $output == "$2" ]]; then + break + fi + sleep 0.5 + done + + is "$output" "$2" "unexpected pod state" +} + ########################### # _add_label_if_missing # make sure skip messages include rootless/remote ########################### |