summaryrefslogtreecommitdiff
path: root/test/e2e/pull_test.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-10-29 20:58:51 +0100
committerGitHub <noreply@github.com>2019-10-29 20:58:51 +0100
commite7540d0406c49b22de245246d16ebc6e1778df37 (patch)
treed25a5f8d259d19f2c0017d9987e93d065e577f89 /test/e2e/pull_test.go
parent5918f3a5f1d11862fbaaca94ff25f1d9cc1309e2 (diff)
parent66c126d6dee178f96f8a120f13372802d46ea9b5 (diff)
downloadpodman-e7540d0406c49b22de245246d16ebc6e1778df37.tar.gz
podman-e7540d0406c49b22de245246d16ebc6e1778df37.tar.bz2
podman-e7540d0406c49b22de245246d16ebc6e1778df37.zip
Merge pull request #4310 from nalind/manifest-lists
Move to containers/image v5, support manifest lists
Diffstat (limited to 'test/e2e/pull_test.go')
-rw-r--r--test/e2e/pull_test.go137
1 files changed, 137 insertions, 0 deletions
diff --git a/test/e2e/pull_test.go b/test/e2e/pull_test.go
index 537084220..5152409af 100644
--- a/test/e2e/pull_test.go
+++ b/test/e2e/pull_test.go
@@ -93,6 +93,143 @@ var _ = Describe("Podman pull", func() {
Expect(session.ExitCode()).To(Equal(0))
})
+ It("podman pull by digest (image list)", func() {
+ session := podmanTest.PodmanNoCache([]string{"pull", "--override-arch=arm64", ALPINELISTDIGEST})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ // inspect using the digest of the list
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.RepoTags}}", ALPINELISTDIGEST})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(string(session.Out.Contents())).To(HavePrefix("[]"))
+ // inspect using the digest of the list
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.RepoDigests}}", ALPINELISTDIGEST})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINELISTDIGEST))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINEARM64DIGEST))
+ // inspect using the digest of the arch-specific image's manifest
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.RepoTags}}", ALPINEARM64DIGEST})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(string(session.Out.Contents())).To(HavePrefix("[]"))
+ // inspect using the digest of the arch-specific image's manifest
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.RepoDigests}}", ALPINEARM64DIGEST})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINELISTDIGEST))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINEARM64DIGEST))
+ // inspect using the image ID
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.RepoTags}}", ALPINEARM64ID})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(string(session.Out.Contents())).To(HavePrefix("[]"))
+ // inspect using the image ID
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.RepoDigests}}", ALPINEARM64ID})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINELISTDIGEST))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINEARM64DIGEST))
+ // remove using the digest of the list
+ session = podmanTest.PodmanNoCache([]string{"rmi", ALPINELISTDIGEST})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ })
+
+ It("podman pull by instance digest (image list)", func() {
+ session := podmanTest.PodmanNoCache([]string{"pull", "--override-arch=arm64", ALPINEARM64DIGEST})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ // inspect using the digest of the list
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.RepoTags}}", ALPINELISTDIGEST})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Not(Equal(0)))
+ // inspect using the digest of the list
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.RepoDigests}}", ALPINELISTDIGEST})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Not(Equal(0)))
+ // inspect using the digest of the arch-specific image's manifest
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.RepoTags}}", ALPINEARM64DIGEST})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(string(session.Out.Contents())).To(HavePrefix("[]"))
+ // inspect using the digest of the arch-specific image's manifest
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.RepoDigests}}", ALPINEARM64DIGEST})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(string(session.Out.Contents())).To(Not(ContainSubstring(ALPINELISTDIGEST)))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINEARM64DIGEST))
+ // inspect using the image ID
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.RepoTags}}", ALPINEARM64ID})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(string(session.Out.Contents())).To(HavePrefix("[]"))
+ // inspect using the image ID
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.RepoDigests}}", ALPINEARM64ID})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(string(session.Out.Contents())).To(Not(ContainSubstring(ALPINELISTDIGEST)))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINEARM64DIGEST))
+ // remove using the digest of the instance
+ session = podmanTest.PodmanNoCache([]string{"rmi", ALPINEARM64DIGEST})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ })
+
+ It("podman pull by tag (image list)", func() {
+ session := podmanTest.PodmanNoCache([]string{"pull", "--override-arch=arm64", ALPINELISTTAG})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ // inspect using the tag we used for pulling
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.RepoTags}}", ALPINELISTTAG})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINELISTTAG))
+ // inspect using the tag we used for pulling
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.RepoDigests}}", ALPINELISTTAG})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINELISTDIGEST))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINEARM64DIGEST))
+ // inspect using the digest of the list
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.RepoTags}}", ALPINELISTDIGEST})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINELISTTAG))
+ // inspect using the digest of the list
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.RepoDigests}}", ALPINELISTDIGEST})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINELISTDIGEST))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINEARM64DIGEST))
+ // inspect using the digest of the arch-specific image's manifest
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.RepoTags}}", ALPINEARM64DIGEST})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINELISTTAG))
+ // inspect using the digest of the arch-specific image's manifest
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.RepoDigests}}", ALPINEARM64DIGEST})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINELISTDIGEST))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINEARM64DIGEST))
+ // inspect using the image ID
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.RepoTags}}", ALPINEARM64ID})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINELISTTAG))
+ // inspect using the image ID
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.RepoDigests}}", ALPINEARM64ID})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINELISTDIGEST))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINEARM64DIGEST))
+ // remove using the tag
+ session = podmanTest.PodmanNoCache([]string{"rmi", ALPINELISTTAG})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ })
+
It("podman pull bogus image", func() {
session := podmanTest.PodmanNoCache([]string{"pull", "umohnani/get-started"})
session.WaitWithDefaultTimeout()