summaryrefslogtreecommitdiff
path: root/test/apiv2
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2022-08-25 14:10:49 -0400
committerMatthew Heon <matthew.heon@pm.me>2022-08-25 16:59:26 -0400
commitc7fda06f669ab1be6b36aa3312c6c6d732e06c9b (patch)
tree122d929a0b557843fbf57afb97bd8b6dd658db2d /test/apiv2
parentf98215c668746e9a7b9603448428cd1301a56eac (diff)
downloadpodman-c7fda06f669ab1be6b36aa3312c6c6d732e06c9b.tar.gz
podman-c7fda06f669ab1be6b36aa3312c6c6d732e06c9b.tar.bz2
podman-c7fda06f669ab1be6b36aa3312c6c6d732e06c9b.zip
Compat API image remove events now have 'delete' status
Change only the compat API, so we don't force a breaking change on Libpod API users. Partial fix for #15485 Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'test/apiv2')
-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