summaryrefslogtreecommitdiff
path: root/test/system
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-05-23 10:12:19 -0400
committerGitHub <noreply@github.com>2022-05-23 10:12:19 -0400
commitbe255287c929999ff018d0b8319e644b4ea77064 (patch)
tree64c7e74e12ed03ae8594bfde1047905865d5a810 /test/system
parente11d8d4650a4ec50064aab416bebb364ac8ac4bf (diff)
parentd66288315df4d756295aaa2f4a98a36b309c2554 (diff)
downloadpodman-be255287c929999ff018d0b8319e644b4ea77064.tar.gz
podman-be255287c929999ff018d0b8319e644b4ea77064.tar.bz2
podman-be255287c929999ff018d0b8319e644b4ea77064.zip
Merge pull request #14292 from vrothberg/fix-14283
auto update: create an event
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
}