From 1e59053cc55f82f21442aff6723c89e2af4ddffe Mon Sep 17 00:00:00 2001 From: baude Date: Wed, 28 Mar 2018 09:15:55 -0500 Subject: Allow sha256: prefix for input We should allow users to pass in image ids with the sha256: prefix for local images. Resolves: #493 Signed-off-by: baude Closes: #560 Approved by: baude --- test/e2e/images_test.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'test') diff --git a/test/e2e/images_test.go b/test/e2e/images_test.go index e05281ac9..8b9b889aa 100644 --- a/test/e2e/images_test.go +++ b/test/e2e/images_test.go @@ -3,6 +3,7 @@ package integration import ( "os" + "fmt" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" ) @@ -129,4 +130,17 @@ var _ = Describe("Podman images", func() { Expect(result.ExitCode()).To(Equal(0)) Expect(len(result.OutputToStringArray())).To(Equal(1)) }) + + It("podman check for image with sha256: prefix", func() { + session := podmanTest.Podman([]string{"inspect", "--format=json", ALPINE}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + Expect(session.IsJSONOutputValid()).To(BeTrue()) + imageData := session.InspectImageJSON() + + result := podmanTest.Podman([]string{"images", fmt.Sprintf("sha256:%s", imageData[0].ID)}) + result.WaitWithDefaultTimeout() + Expect(result.ExitCode()).To(Equal(0)) + }) + }) -- cgit v1.2.3-54-g00ecf