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.
@@ -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()
