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 <vrothberg@redhat.com>
This commit is contained in:
Valentin Rothberg
2023-03-01 13:43:29 +01:00
parent 3cab05aa3e
commit b727f30ac6

View File

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