diff options
-rw-r--r-- | test/e2e/pull_test.go | 30 |
1 files changed, 8 insertions, 22 deletions
diff --git a/test/e2e/pull_test.go b/test/e2e/pull_test.go index 0eff9a550..20f0a6b38 100644 --- a/test/e2e/pull_test.go +++ b/test/e2e/pull_test.go @@ -5,7 +5,6 @@ import ( "os" "path/filepath" "runtime" - "strings" . "github.com/containers/podman/v4/test/utils" . "github.com/onsi/ginkgo" @@ -59,10 +58,16 @@ var _ = Describe("Podman pull", func() { Expect(session).To(ExitWithError()) }) - It("podman pull with tag", func() { - session := podmanTest.Podman([]string{"pull", "quay.io/libpod/testdigest_v2s2:20200210"}) + It("podman pull with tag --quiet", func() { + session := podmanTest.Podman([]string{"pull", "-q", "quay.io/libpod/testdigest_v2s2:20200210"}) session.WaitWithDefaultTimeout() Expect(session).Should(Exit(0)) + quietOutput := session.OutputToString() + + session = podmanTest.Podman([]string{"inspect", "testdigest_v2s2:20200210", "--format", "{{.ID}}"}) + session.WaitWithDefaultTimeout() + Expect(session).Should(Exit(0)) + Expect(session.OutputToString()).To(Equal(quietOutput)) session = podmanTest.Podman([]string{"rmi", "testdigest_v2s2:20200210"}) session.WaitWithDefaultTimeout() @@ -94,25 +99,6 @@ var _ = Describe("Podman pull", func() { Expect(session).Should(Exit(0)) }) - It("podman pull check quiet", func() { - err := podmanTest.RestoreArtifact(ALPINE) - Expect(err).ToNot(HaveOccurred()) - setup := podmanTest.Podman([]string{"images", ALPINE, "-q", "--no-trunc"}) - setup.WaitWithDefaultTimeout() - Expect(setup).Should(Exit(0)) - shortImageID := strings.Split(setup.OutputToString(), ":")[1] - - rmi := podmanTest.Podman([]string{"rmi", ALPINE}) - rmi.WaitWithDefaultTimeout() - Expect(rmi).Should(Exit(0)) - - pull := podmanTest.Podman([]string{"pull", "-q", ALPINE}) - pull.WaitWithDefaultTimeout() - Expect(pull).Should(Exit(0)) - - Expect(pull.OutputToString()).To(ContainSubstring(shortImageID)) - }) - It("podman pull check all tags", func() { session := podmanTest.Podman([]string{"pull", "--all-tags", "k8s.gcr.io/pause"}) session.WaitWithDefaultTimeout() |