summaryrefslogtreecommitdiff
path: root/test/apiv2
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-12-11 10:20:16 -0500
committerGitHub <noreply@github.com>2020-12-11 10:20:16 -0500
commit99ac30a88287e2c174e69812293f6b130f7a67d5 (patch)
tree7af3995e5609a86e21fa61b54cc25ec72761ec8e /test/apiv2
parent335c59e7dcd06429c56c0f58e859f7694fcbc891 (diff)
parentfb25f737e527279132a1572552ba12084a03f597 (diff)
downloadpodman-99ac30a88287e2c174e69812293f6b130f7a67d5.tar.gz
podman-99ac30a88287e2c174e69812293f6b130f7a67d5.tar.bz2
podman-99ac30a88287e2c174e69812293f6b130f7a67d5.zip
Merge pull request #8690 from zhangguanzhang/apiv2-wrong-ImgName
Fix Wrong img name used when creating a container from an image which had multi names
Diffstat (limited to 'test/apiv2')
-rw-r--r--test/apiv2/20-containers.at11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/apiv2/20-containers.at b/test/apiv2/20-containers.at
index 5c35edf2b..bc6efc20d 100644
--- a/test/apiv2/20-containers.at
+++ b/test/apiv2/20-containers.at
@@ -5,8 +5,10 @@
# WORKDIR=/data
ENV_WORKDIR_IMG=quay.io/libpod/testimage:20200929
+MultiTagName=localhost/test/testformultitag:tag
podman pull $IMAGE &>/dev/null
+podman tag $IMAGE $MultiTagName
podman pull $ENV_WORKDIR_IMG &>/dev/null
# Unimplemented
#t POST libpod/containers/create '' 201 'sdf'
@@ -216,4 +218,13 @@ t GET containers/$cid/json 200 \
t DELETE containers/$cid 204
+# when the image had multi tags, the container's Image should be correct
+# Fixes https://github.com/containers/podman/issues/8547
+t POST containers/create Image=${MultiTagName} 201 \
+ .Id~[0-9a-f]\\{64\\}
+cid=$(jq -r '.Id' <<<"$output")
+t GET containers/$cid/json 200 \
+ .Image=${MultiTagName}
+t DELETE containers/$cid 204
+t DELETE images/${MultiTagName}?force=true 200
# vim: filetype=sh