From 59f31d86acdf54019b081ca86340d5c33dbcf3b9 Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Thu, 15 Jul 2021 11:27:25 +0200 Subject: auto-update: add --dry-run Add a --dry-run flag to `podman auto-update` which will look for new images but won't perform any pull or restart any service or container. The "UPDATED" column will now indicate the availability of a newer image via "pending". ``` $ podman auto-update --dry-run UNIT CONTAINER IMAGE POLICY UPDATED container-test.service 08fd34e533fd (test) localhost:5000/busybox registry false ``` Fixes: #9949 Signed-off-by: Valentin Rothberg --- test/system/255-auto-update.bats | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test') diff --git a/test/system/255-auto-update.bats b/test/system/255-auto-update.bats index 4959bb6aa..5e2d66af9 100644 --- a/test/system/255-auto-update.bats +++ b/test/system/255-auto-update.bats @@ -121,6 +121,9 @@ function _confirm_update() { generate_service alpine 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/alpine:latest,pending,registry.*" "Image update is pending." + run_podman auto-update --format "{{.Unit}},{{.Image}},{{.Updated}},{{.Policy}}" is "$output" "Trying to pull.*" "Image is updated." is "$output" ".*container-$cname.service,quay.io/libpod/alpine:latest,true,registry.*" "Image is updated." @@ -159,6 +162,9 @@ function _confirm_update() { imageID="$output" _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." + run_podman auto-update --format "{{.Unit}},{{.Image}},{{.Updated}},{{.Policy}}" is "$output" ".*container-$cname.service,quay.io/libpod/localtest:latest,true,local.*" "Image is updated." -- cgit v1.2.3-54-g00ecf