aboutsummaryrefslogtreecommitdiff
path: root/test/apiv2/10-images.at
diff options
context:
space:
mode:
authorAditya R <arajan@redhat.com>2022-01-20 17:40:27 +0530
committerAditya R <arajan@redhat.com>2022-01-21 00:23:54 +0530
commit9df31cfb7784b158308abc5eabb7ff5176011518 (patch)
treec0d33ca964b68b124c0a8880e32b8446fa115f39 /test/apiv2/10-images.at
parent1d6e154a73505cd0366cdeec7cc8582dd3ac2191 (diff)
downloadpodman-9df31cfb7784b158308abc5eabb7ff5176011518.tar.gz
podman-9df31cfb7784b158308abc5eabb7ff5176011518.tar.bz2
podman-9df31cfb7784b158308abc5eabb7ff5176011518.zip
compat: images/load must be able to load tar with multiple images
`http:/host:port/images/load` fails to accept tar with more than one images however manual load works as expected. Remove explicit check for `1` image and only fail if result set has value less than `1`. Signed-off-by: Aditya R <arajan@redhat.com>
Diffstat (limited to 'test/apiv2/10-images.at')
-rw-r--r--test/apiv2/10-images.at8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/apiv2/10-images.at b/test/apiv2/10-images.at
index 36c2fc6aa..673858a3c 100644
--- a/test/apiv2/10-images.at
+++ b/test/apiv2/10-images.at
@@ -197,6 +197,14 @@ t POST "build?dockerfile=containerfile" $CONTAINERFILE_TAR 200 \
t POST libpod/images/prune 200
t POST libpod/images/prune 200 length=0 []
+# compat api must allow loading tar which contain multiple images
+podman pull quay.io/libpod/alpine:latest quay.io/libpod/busybox:latest
+podman save -o ${TMPD}/test.tar quay.io/libpod/alpine:latest quay.io/libpod/busybox:latest
+t POST "images/load" ${TMPD}/test.tar 200 \
+ .stream="Loaded image: quay.io/libpod/busybox:latest,quay.io/libpod/alpine:latest"
+t GET libpod/images/quay.io/libpod/alpine:latest/exists 204
+t GET libpod/images/quay.io/libpod/busybox:latest/exists 204
+
cleanBuildTest
# vim: filetype=sh