aboutsummaryrefslogtreecommitdiff
path: root/test/system
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2021-07-15 11:27:25 +0200
committerValentin Rothberg <rothberg@redhat.com>2021-07-15 11:39:50 +0200
commit59f31d86acdf54019b081ca86340d5c33dbcf3b9 (patch)
tree3b243e70c88bb03880d6f1fc459d5f1d57e07cce /test/system
parent1568247ec8fa0c1a23bbd4631c1ea2fcfd85e281 (diff)
downloadpodman-59f31d86acdf54019b081ca86340d5c33dbcf3b9.tar.gz
podman-59f31d86acdf54019b081ca86340d5c33dbcf3b9.tar.bz2
podman-59f31d86acdf54019b081ca86340d5c33dbcf3b9.zip
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 <rothberg@redhat.com>
Diffstat (limited to 'test/system')
-rw-r--r--test/system/255-auto-update.bats6
1 files changed, 6 insertions, 0 deletions
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."