From 05c65e88e3992eb57aee9f0dcb622de8a6d81a70 Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Tue, 15 Oct 2019 11:14:37 -0400 Subject: 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 --- test/e2e/create_test.go | 56 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) (limited to 'test/e2e/create_test.go') 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)) + }) }) -- cgit v1.2.3-54-g00ecf