summaryrefslogtreecommitdiff
path: root/test/system
diff options
context:
space:
mode:
authorValentin Rothberg <vrothberg@redhat.com>2022-05-19 13:46:10 +0200
committerValentin Rothberg <vrothberg@redhat.com>2022-05-23 14:11:29 +0200
commitd66288315df4d756295aaa2f4a98a36b309c2554 (patch)
tree7225d83c732da653e2e28c11c5a6e0b16fd7ba9e /test/system
parent769e777656e62172ccdd1b98989627d6dae57a96 (diff)
downloadpodman-d66288315df4d756295aaa2f4a98a36b309c2554.tar.gz
podman-d66288315df4d756295aaa2f4a98a36b309c2554.tar.bz2
podman-d66288315df4d756295aaa2f4a98a36b309c2554.zip
auto update: create an event
Create an auto-update event for each invocation, independent if images and containers are updated or not. Those events will be indicated in the events already but users will now know why. Fixes: #14283 Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
Diffstat (limited to 'test/system')
-rw-r--r--test/system/255-auto-update.bats12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/system/255-auto-update.bats b/test/system/255-auto-update.bats
index 6cdae2ada..6cee939fb 100644
--- a/test/system/255-auto-update.bats
+++ b/test/system/255-auto-update.bats
@@ -135,15 +135,27 @@ function _confirm_update() {
# This test can fail in dev. environment because of SELinux.
# quick fix: chcon -t container_runtime_exec_t ./bin/podman
@test "podman auto-update - label io.containers.autoupdate=image" {
+ since=$(date --iso-8601=seconds)
+ run_podman auto-update
+ is "$output" ""
+ run_podman events --filter type=system --since $since --stream=false
+ is "$output" ""
+
generate_service alpine image
_wait_service_ready container-$cname.service
+ since=$(date --iso-8601=seconds)
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 events --filter type=system --since $since --stream=false
+ is "$output" ".* system auto-update"
+ since=$(date --iso-8601=seconds)
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."
+ run_podman events --filter type=system --since $since --stream=false
+ is "$output" ".* system auto-update"
_confirm_update $cname $ori_image
}