summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-07-14 15:26:01 -0400
committerGitHub <noreply@github.com>2021-07-14 15:26:01 -0400
commitce4c23c4af3adb6b2d41d337720bb78be5db0f71 (patch)
tree98807acc34961759539e6d3c19da3f011a773032 /test
parent9570bf6b30ae35a4227a021c5ef7382515f2a790 (diff)
parent01cfb51fe989f5b3d810961e6813653f10ea541a (diff)
downloadpodman-ce4c23c4af3adb6b2d41d337720bb78be5db0f71.tar.gz
podman-ce4c23c4af3adb6b2d41d337720bb78be5db0f71.tar.bz2
podman-ce4c23c4af3adb6b2d41d337720bb78be5db0f71.zip
Merge pull request #10880 from vrothberg/auto-update
auto-update: make output more user friendly
Diffstat (limited to 'test')
-rw-r--r--test/system/250-systemd.bats2
-rw-r--r--test/system/255-auto-update.bats13
2 files changed, 11 insertions, 4 deletions
diff --git a/test/system/250-systemd.bats b/test/system/250-systemd.bats
index 4ea192009..aafe385c8 100644
--- a/test/system/250-systemd.bats
+++ b/test/system/250-systemd.bats
@@ -119,7 +119,7 @@ function service_cleanup() {
# Run auto-update and check that it restarted the container
run_podman commit --change "CMD=/bin/bash" $cname $IMAGE
run_podman auto-update
- is $output $SERVICE_NAME "autoupdate local restarted container"
+ is "$output" ".*$SERVICE_NAME.*" "autoupdate local restarted container"
# All good. Stop service, clean up.
service_cleanup
diff --git a/test/system/255-auto-update.bats b/test/system/255-auto-update.bats
index 3713243d5..4959bb6aa 100644
--- a/test/system/255-auto-update.bats
+++ b/test/system/255-auto-update.bats
@@ -121,8 +121,10 @@ function _confirm_update() {
generate_service alpine image
_wait_service_ready container-$cname.service
- run_podman auto-update
+ 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."
+
_confirm_update $cname $ori_image
}
@@ -151,10 +153,15 @@ function _confirm_update() {
@test "podman auto-update - label io.containers.autoupdate=local" {
generate_service localtest local
- podman commit --change CMD=/bin/bash $cname quay.io/libpod/localtest:latest
+ image=quay.io/libpod/localtest:latest
+ podman commit --change CMD=/bin/bash $cname $image
+ podman image inspect --format "{{.ID}}" $image
+ imageID="$output"
_wait_service_ready container-$cname.service
- run_podman auto-update
+ run_podman auto-update --format "{{.Unit}},{{.Image}},{{.Updated}},{{.Policy}}"
+ is "$output" ".*container-$cname.service,quay.io/libpod/localtest:latest,true,local.*" "Image is updated."
+
_confirm_update $cname $ori_image
}