summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2021-02-16 13:32:31 +0100
committerMatthew Heon <mheon@redhat.com>2021-02-18 10:40:40 -0500
commit8d11461a7a659830619cfcdfa2999f8a65beb79a (patch)
tree780364f695fd26d9f5f290f1bcf5c9fb5f7c880a /test
parente9328d13f4d6360fe772bc18475e0e71ae8280b9 (diff)
downloadpodman-8d11461a7a659830619cfcdfa2999f8a65beb79a.tar.gz
podman-8d11461a7a659830619cfcdfa2999f8a65beb79a.tar.bz2
podman-8d11461a7a659830619cfcdfa2999f8a65beb79a.zip
images/create: always pull image
The `images/create` endpoint should always attempt to pull a newer image. Previously, the local images was used which is not compatible with Docker and caused issues in the Gitlab CI. Fixes: #9232 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'test')
-rw-r--r--test/apiv2/10-images.at7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/apiv2/10-images.at b/test/apiv2/10-images.at
index 7b500bf57..30090d806 100644
--- a/test/apiv2/10-images.at
+++ b/test/apiv2/10-images.at
@@ -45,6 +45,13 @@ t POST "images/create?fromImage=alpine" '' 200
t POST "images/create?fromImage=alpine&tag=latest" '' 200
+# Make sure that new images are pulled
+old_iid=$(podman image inspect --format "{{.ID}}" docker.io/library/alpine:latest)
+podman rmi -f docker.io/library/alpine:latest
+podman tag $IMAGE docker.io/library/alpine:latest
+t POST "images/create?fromImage=alpine" '' 200 .error=null .status~".*$old_iid.*"
+podman untag $IMAGE docker.io/library/alpine:latest
+
t POST "images/create?fromImage=quay.io/libpod/alpine&tag=sha256:fa93b01658e3a5a1686dc3ae55f170d8de487006fb53a28efcd12ab0710a2e5f" '' 200
# Display the image history