From 409ed259c6b3ea9122c697e9e20b4b1572f485d1 Mon Sep 17 00:00:00 2001 From: baude Date: Thu, 15 Feb 2018 10:33:18 -0600 Subject: Return imageid from podman pull When using podman to pull an image, print the image id after the image is pulled. Resolves issue #329 Signed-off-by: baude Closes: #342 Approved by: rhatdan --- test/e2e/pull_test.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'test') diff --git a/test/e2e/pull_test.go b/test/e2e/pull_test.go index e24d8a5a7..25e33240e 100644 --- a/test/e2e/pull_test.go +++ b/test/e2e/pull_test.go @@ -5,6 +5,7 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" + "strings" ) var _ = Describe("Podman pull", func() { @@ -138,4 +139,22 @@ var _ = Describe("Podman pull", func() { clean := podmanTest.SystemExec("rm", []string{"-fr", "/tmp/podmantestdir"}) clean.WaitWithDefaultTimeout() }) + + It("podman pull from local directory", func() { + podmanTest.RestoreArtifact(ALPINE) + setup := podmanTest.Podman([]string{"images", ALPINE, "-q", "--no-trunc"}) + setup.WaitWithDefaultTimeout() + Expect(setup.ExitCode()).To(Equal(0)) + shortImageId := strings.Split(setup.OutputToString(), ":")[1] + + rmi := podmanTest.Podman([]string{"rmi", ALPINE}) + rmi.WaitWithDefaultTimeout() + Expect(rmi.ExitCode()).To(Equal(0)) + + pull := podmanTest.Podman([]string{"pull", "-q", ALPINE}) + pull.WaitWithDefaultTimeout() + Expect(pull.ExitCode()).To(Equal(0)) + + Expect(pull.OutputToString()).To(ContainSubstring(shortImageId)) + }) }) -- cgit v1.2.3-54-g00ecf