From b727f30ac686c575718006cac16682966a1c1689 Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Wed, 1 Mar 2023 13:43:29 +0100 Subject: [PATCH] auto-update test: wait for service to be ready The symptoms in #17607 point to some race since it does not always flake on Debian (and Debian only). Hence, wait for the service to be ready before building the image to make sure that the service is started with the old image and that everything's in order. Fixes: #17607 Signed-off-by: Valentin Rothberg --- test/system/255-auto-update.bats | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/system/255-auto-update.bats b/test/system/255-auto-update.bats index f9446d94eb..5864b47a2e 100644 --- a/test/system/255-auto-update.bats +++ b/test/system/255-auto-update.bats @@ -239,11 +239,12 @@ function _confirm_update() { @test "podman auto-update - label io.containers.autoupdate=local" { generate_service localtest local + _wait_service_ready container-$cname.service + image=quay.io/libpod/localtest:latest run_podman commit --change CMD=/bin/bash $cname $image run_podman image inspect --format "{{.ID}}" $image - _wait_service_ready container-$cname.service run_podman auto-update --dry-run --format "{{.Unit}},{{.Image}},{{.Updated}},{{.Policy}}" is "$output" ".*container-$cname.service,quay.io/libpod/localtest:latest,pending,local.*" "Image update is pending."