summaryrefslogtreecommitdiff
path: root/test/apiv2
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2020-10-02 17:24:37 +0200
committerValentin Rothberg <rothberg@redhat.com>2020-10-02 17:24:37 +0200
commit6a291942c253fcb13fc2ee0990f2137ca3584270 (patch)
tree34582977a4877d76e8d36889e8953e96138159e4 /test/apiv2
parent14fd7b4d6ac18aaa5705990f3dd0ed13477258ad (diff)
downloadpodman-6a291942c253fcb13fc2ee0990f2137ca3584270.tar.gz
podman-6a291942c253fcb13fc2ee0990f2137ca3584270.tar.bz2
podman-6a291942c253fcb13fc2ee0990f2137ca3584270.zip
compat: images/create: fix tag parsing
The `tag` parameter of the compat `images/create` endpoint can be both, a tag and a digest. Fix parsing of the parameter to detect digests and use the appropriate `@` separator. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'test/apiv2')
-rw-r--r--test/apiv2/10-images.at6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/apiv2/10-images.at b/test/apiv2/10-images.at
index a204df65c..bdc298ae3 100644
--- a/test/apiv2/10-images.at
+++ b/test/apiv2/10-images.at
@@ -39,7 +39,11 @@ t GET images/$iid/json 200 \
.Id=sha256:$iid \
.RepoTags[0]=$IMAGE
-#t POST images/create fromImage=alpine 201 foo
+t POST "images/create?fromImage=alpine" '' 200
+
+t POST "images/create?fromImage=alpine&tag=latest" '' 200
+
+t POST "images/create?fromImage=docker.io/library/alpine&tag=sha256:acd3ca9941a85e8ed16515bfc5328e4e2f8c128caa72959a58a127b7801ee01f" '' 200
# Display the image history
t GET libpod/images/nonesuch/history 404