mirror of
https://github.com/containers/podman.git
synced 2025-12-08 14:48:48 +08:00
compat: accept tag in /images/create?fromSrc
Accept a tag in the compat api endpoint. For the fromImage param we already parse it but for fromSrc we did not. Fixes #18597 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
@@ -66,6 +66,13 @@ podman untag docker.io/library/alpine:latest
|
||||
|
||||
t POST "images/create?fromImage=quay.io/libpod/alpine&tag=sha256:fa93b01658e3a5a1686dc3ae55f170d8de487006fb53a28efcd12ab0710a2e5f" 200
|
||||
|
||||
# create image from source with tag
|
||||
# Note the "-" is used to use an empty body and not "{}" which is the default.
|
||||
t POST "images/create?fromSrc=-&repo=myimage&tag=mytag" - 200
|
||||
t GET "images/myimage:mytag/json" 200 \
|
||||
.Id~'^sha256:[0-9a-f]\{64\}$' \
|
||||
.RepoTags[0]="docker.io/library/myimage:mytag"
|
||||
|
||||
# Display the image history
|
||||
t GET libpod/images/nonesuch/history 404
|
||||
|
||||
|
||||
@@ -255,6 +255,10 @@ function t() {
|
||||
|
||||
for arg; do
|
||||
case "$arg" in
|
||||
# This is just some hack to avoid adding `-d {}` to curl for endpoints where we really need an empty body.
|
||||
# --disable makes curl not lookup the curlrc file, it't should't effect the tests in any way.
|
||||
-) curl_args+=(--disable);
|
||||
shift;;
|
||||
*=*) post_args+=("$arg");
|
||||
shift;;
|
||||
*.json) _add_curl_args $arg;
|
||||
|
||||
Reference in New Issue
Block a user