summaryrefslogtreecommitdiff
path: root/pkg/bindings/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-03-31 21:12:49 +0200
committerGitHub <noreply@github.com>2020-03-31 21:12:49 +0200
commit6e8f6cab602b43d05c97c167faa56b3f46f1f73a (patch)
treec4b4f2ab7e91e4f49d2fe5a9b9d89be455bdd219 /pkg/bindings/test
parent56ab9e4cc8a33bb8a791a799753a11c33809dedf (diff)
parent3bdad6fa2af41be7e783256f3c8a213dc42ca8f6 (diff)
downloadpodman-6e8f6cab602b43d05c97c167faa56b3f46f1f73a.tar.gz
podman-6e8f6cab602b43d05c97c167faa56b3f46f1f73a.tar.bz2
podman-6e8f6cab602b43d05c97c167faa56b3f46f1f73a.zip
Merge pull request #5675 from vrothberg/v2-pull
podmanV2: implement pull
Diffstat (limited to 'pkg/bindings/test')
-rw-r--r--pkg/bindings/test/images_test.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/pkg/bindings/test/images_test.go b/pkg/bindings/test/images_test.go
index 13b6086c3..dc01a793b 100644
--- a/pkg/bindings/test/images_test.go
+++ b/pkg/bindings/test/images_test.go
@@ -9,6 +9,7 @@ import (
"github.com/containers/libpod/pkg/bindings"
"github.com/containers/libpod/pkg/bindings/containers"
"github.com/containers/libpod/pkg/bindings/images"
+ "github.com/containers/libpod/pkg/domain/entities"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"
@@ -353,4 +354,24 @@ var _ = Describe("Podman images", func() {
Expect(results).To(ContainElement("docker.io/library/alpine:latest"))
})
+ // TODO: we really need to extent to pull tests once we have a more sophisticated CI.
+ It("Image Pull", func() {
+ rawImage := "docker.io/library/busybox:latest"
+
+ pulledImages, err := images.Pull(bt.conn, rawImage, entities.ImagePullOptions{})
+ Expect(err).To(BeNil())
+ Expect(len(pulledImages)).To(Equal(1))
+
+ exists, err := images.Exists(bt.conn, rawImage)
+ Expect(err).To(BeNil())
+ Expect(exists).To(BeTrue())
+
+ // Make sure the normalization AND the full-transport reference works.
+ _, err = images.Pull(bt.conn, "docker://"+rawImage, entities.ImagePullOptions{})
+ Expect(err).To(BeNil())
+
+ // The v2 endpoint only supports the docker transport. Let's see if that's really true.
+ _, err = images.Pull(bt.conn, "bogus-transport:bogus.com/image:reference", entities.ImagePullOptions{})
+ Expect(err).To(Not(BeNil()))
+ })
})