summaryrefslogtreecommitdiff
path: root/test/e2e/create_test.go
diff options
context:
space:
mode:
authorNalin Dahyabhai <nalin@redhat.com>2019-10-15 11:14:37 -0400
committerNalin Dahyabhai <nalin@redhat.com>2019-10-29 13:35:19 -0400
commit05c65e88e3992eb57aee9f0dcb622de8a6d81a70 (patch)
tree770252475297aa3d466ffd2d516dd7ccdd0186bf /test/e2e/create_test.go
parenta4a70b4506ec4abb8b3bbc3873ee5ca015a8ed08 (diff)
downloadpodman-05c65e88e3992eb57aee9f0dcb622de8a6d81a70.tar.gz
podman-05c65e88e3992eb57aee9f0dcb622de8a6d81a70.tar.bz2
podman-05c65e88e3992eb57aee9f0dcb622de8a6d81a70.zip
Add e2e tests for manifest list support
Test that when we pull using tag or digest references from locations that are manifest lists, that we can inspect using the references that we used for pulling, that the tags show up in the RepoTag list when we inspect an image that was pulled using a tag, and that the list and instance digests always both show up in the RepoDigest list. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Diffstat (limited to 'test/e2e/create_test.go')
-rw-r--r--test/e2e/create_test.go56
1 files changed, 56 insertions, 0 deletions
diff --git a/test/e2e/create_test.go b/test/e2e/create_test.go
index 65b747880..f2020547f 100644
--- a/test/e2e/create_test.go
+++ b/test/e2e/create_test.go
@@ -241,4 +241,60 @@ var _ = Describe("Podman create", func() {
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To((Equal(0)))
})
+
+ It("podman create using image list by tag", func() {
+ session := podmanTest.PodmanNoCache([]string{"create", "--pull=always", "--override-arch=arm64", "--name=foo", ALPINELISTTAG})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To((Equal(0)))
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.Image}}", "foo"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To((Equal(0)))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINEARM64ID))
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.ImageName}}", "foo"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To((Equal(0)))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINELISTTAG))
+ })
+
+ It("podman create using image list by digest", func() {
+ session := podmanTest.PodmanNoCache([]string{"create", "--pull=always", "--override-arch=arm64", "--name=foo", ALPINELISTDIGEST})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To((Equal(0)))
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.Image}}", "foo"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To((Equal(0)))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINEARM64ID))
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.ImageName}}", "foo"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To((Equal(0)))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINELISTDIGEST))
+ })
+
+ It("podman create using image list instance by digest", func() {
+ session := podmanTest.PodmanNoCache([]string{"create", "--pull=always", "--override-arch=arm64", "--name=foo", ALPINEARM64DIGEST})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To((Equal(0)))
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.Image}}", "foo"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To((Equal(0)))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINEARM64ID))
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.ImageName}}", "foo"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To((Equal(0)))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINEARM64DIGEST))
+ })
+
+ It("podman create using cross-arch image list instance by digest", func() {
+ session := podmanTest.PodmanNoCache([]string{"create", "--pull=always", "--override-arch=ppc64le", "--name=foo", ALPINEARM64DIGEST})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To((Equal(0)))
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.Image}}", "foo"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To((Equal(0)))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINEARM64ID))
+ session = podmanTest.PodmanNoCache([]string{"inspect", "--format", "{{.ImageName}}", "foo"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To((Equal(0)))
+ Expect(string(session.Out.Contents())).To(ContainSubstring(ALPINEARM64DIGEST))
+ })
})