summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-08-26 04:20:22 -0400
committerGitHub <noreply@github.com>2022-08-26 04:20:22 -0400
commitac3d9c67ee28fb8b023117eae1be040c7adc6ae8 (patch)
tree8ad037876f5ef9f26f3139dfcc74f660213f2558 /test
parent36cf6f572a360af91bf261936b6ed6849f355478 (diff)
parentc7fda06f669ab1be6b36aa3312c6c6d732e06c9b (diff)
downloadpodman-ac3d9c67ee28fb8b023117eae1be040c7adc6ae8.tar.gz
podman-ac3d9c67ee28fb8b023117eae1be040c7adc6ae8.tar.bz2
podman-ac3d9c67ee28fb8b023117eae1be040c7adc6ae8.zip
Merge pull request #15487 from mheon/image_delete_event
Compat API image remove events now have 'delete' status
Diffstat (limited to 'test')
-rw-r--r--test/apiv2/10-images.at19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/apiv2/10-images.at b/test/apiv2/10-images.at
index 4fd954e37..86ee2a1f5 100644
--- a/test/apiv2/10-images.at
+++ b/test/apiv2/10-images.at
@@ -239,4 +239,23 @@ fi
cleanBuildTest
+# compat API vs libpod API event differences:
+# on image removal, libpod produces 'remove' events.
+# compat produces 'delete' events.
+podman image build -t test:test -<<EOF
+from $IMAGE
+EOF
+
+START=$(date +%s)
+
+t DELETE libpod/images/test:test 200
+# HACK HACK HACK There is a race around events being added to the journal
+# This sleep seems to avoid the race.
+# If it fails and begins to flake, investigate a retry loop.
+sleep 1
+t GET "libpod/events?stream=false&since=$START" 200 \
+ 'select(.status | contains("remove")).Action=remove'
+t GET "events?stream=false&since=$START" 200 \
+ 'select(.status | contains("delete")).Action=delete'
+
# vim: filetype=sh