summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin Rothberg <vrothberg@redhat.com>2022-05-05 10:47:32 +0200
committerValentin Rothberg <vrothberg@redhat.com>2022-05-05 11:03:14 +0200
commit140fb3ae1743e5ae5e94a18a29d53ea819471435 (patch)
treed9e82687a690f0cea05900465e48450f9b7857d7
parent669401c31468bf61e13a909655036d5acddbcb31 (diff)
downloadpodman-140fb3ae1743e5ae5e94a18a29d53ea819471435.tar.gz
podman-140fb3ae1743e5ae5e94a18a29d53ea819471435.tar.bz2
podman-140fb3ae1743e5ae5e94a18a29d53ea819471435.zip
e2e: pull_test: squash --quiet test
Squash the --quiet test into another one. The test was more complex than necessary and can easily be squashed into another one to avoid one more expensive pull. Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
-rw-r--r--test/e2e/pull_test.go30
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()