summaryrefslogtreecommitdiff
path: root/test/apiv2/10-images.at
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-05-28 12:55:25 -0400
committerGitHub <noreply@github.com>2020-05-28 12:55:25 -0400
commit4b2c980e0f74abd480d5c8213e9cd416108d5169 (patch)
tree98dcae2b38fecfa2274d008d903bc5419614aefd /test/apiv2/10-images.at
parentadca437d03bc74edcf3ef9b60ea55360157f893c (diff)
parent7e03d277f7a08e127190a4ffd052e91ffc077f3b (diff)
downloadpodman-4b2c980e0f74abd480d5c8213e9cd416108d5169.tar.gz
podman-4b2c980e0f74abd480d5c8213e9cd416108d5169.tar.bz2
podman-4b2c980e0f74abd480d5c8213e9cd416108d5169.zip
Merge pull request #6391 from chuanchang/add_test_for_image_history_and_exporting
test.apiv2: add testing for displaying image history and exporting image
Diffstat (limited to 'test/apiv2/10-images.at')
-rw-r--r--test/apiv2/10-images.at23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/apiv2/10-images.at b/test/apiv2/10-images.at
index 1c8da0c2f..2a1eaf8be 100644
--- a/test/apiv2/10-images.at
+++ b/test/apiv2/10-images.at
@@ -33,4 +33,27 @@ t GET images/$iid/json 200 \
#t POST images/create fromImage=alpine 201 foo
+# Display the image history
+t GET libpod/images/nonesuch/history 404
+
+for i in $iid ${iid:0:12} $PODMAN_TEST_IMAGE_NAME; do
+ t GET libpod/images/$i/history 200 \
+ .[0].Id=$iid \
+ .[0].Created~[0-9]\\{10\\} \
+ .[0].Tags=null \
+ .[0].Size=0 \
+ .[0].Comment=
+done
+
+# Export an image on the local
+t GET libpod/images/nonesuch/get 404
+t GET libpod/images/$iid/get?format=foo 500
+t GET libpod/images/$PODMAN_TEST_IMAGE_NAME/get?compress=bar 400
+
+for i in $iid ${iid:0:12} $PODMAN_TEST_IMAGE_NAME; do
+ t GET "libpod/images/$i/get" 200 '[POSIX tar archive]'
+ t GET "libpod/images/$i/get?compress=true" 200 '[POSIX tar archive]'
+ t GET "libpod/images/$i/get?compress=false" 200 '[POSIX tar archive]'
+done
+
# vim: filetype=sh