Skip to content

Commit

Permalink
auto-update test: wait for service to be ready
Browse files Browse the repository at this point in the history
The symptoms in containers#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: containers#17607
Signed-off-by: Valentin Rothberg <[email protected]>
  • Loading branch information
vrothberg committed Mar 1, 2023
1 parent 3cab05a commit b727f30
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/system/255-auto-update.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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."

Expand Down

0 comments on commit b727f30

Please sign in to comment.