summaryrefslogtreecommitdiff
path: root/test/e2e/images_test.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2020-10-27 09:14:53 -0500
committerbaude <bbaude@redhat.com>2020-11-16 08:15:44 -0600
commit15539c1c4bdb10095bb4d30c6283795dac657600 (patch)
tree6a0090d6ab89eb7665067ce32194f45b9dfe38da /test/e2e/images_test.go
parent392075631a284617b7e37b8bdfb3157f5918cdec (diff)
downloadpodman-15539c1c4bdb10095bb4d30c6283795dac657600.tar.gz
podman-15539c1c4bdb10095bb4d30c6283795dac657600.tar.bz2
podman-15539c1c4bdb10095bb4d30c6283795dac657600.zip
use lookaside storage for remote tests
in an effort to speed up the remote testing, we should be using lookaside storage to avoid pull images as well as importing multiple images into the RW store. one test was removed and added into system test by Ed in #8325 Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'test/e2e/images_test.go')
-rw-r--r--test/e2e/images_test.go78
1 files changed, 28 insertions, 50 deletions
diff --git a/test/e2e/images_test.go b/test/e2e/images_test.go
index 96eccdc28..4c65a85d5 100644
--- a/test/e2e/images_test.go
+++ b/test/e2e/images_test.go
@@ -45,18 +45,6 @@ var _ = Describe("Podman images", func() {
Expect(session.LineInOuputStartsWith("quay.io/libpod/busybox")).To(BeTrue())
})
- It("podman images with no images prints header", func() {
- rmi := podmanTest.PodmanNoCache([]string{"rmi", "-a"})
- rmi.WaitWithDefaultTimeout()
- Expect(rmi).Should(Exit(0))
-
- session := podmanTest.PodmanNoCache([]string{"images"})
- session.WaitWithDefaultTimeout()
- Expect(session).Should(Exit(0))
- Expect(len(session.OutputToStringArray())).To(Equal(1))
- Expect(session.LineInOutputContains("REPOSITORY")).To(BeTrue())
- })
-
It("podman image List", func() {
session := podmanTest.Podman([]string{"image", "list"})
session.WaitWithDefaultTimeout()
@@ -68,16 +56,16 @@ var _ = Describe("Podman images", func() {
It("podman images with multiple tags", func() {
// tag "docker.io/library/alpine:latest" to "foo:{a,b,c}"
- podmanTest.RestoreAllArtifacts()
- session := podmanTest.PodmanNoCache([]string{"tag", ALPINE, "foo:a", "foo:b", "foo:c"})
+ podmanTest.AddImageToRWStore(ALPINE)
+ session := podmanTest.Podman([]string{"tag", ALPINE, "foo:a", "foo:b", "foo:c"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
// tag "foo:c" to "bar:{a,b}"
- session = podmanTest.PodmanNoCache([]string{"tag", "foo:c", "bar:a", "bar:b"})
+ session = podmanTest.Podman([]string{"tag", "foo:c", "bar:a", "bar:b"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
// check all previous and the newly tagged images
- session = podmanTest.PodmanNoCache([]string{"images"})
+ session = podmanTest.Podman([]string{"images"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
Expect(session.LineInOutputContainsTag("quay.io/libpod/alpine", "latest")).To(BeTrue())
@@ -87,10 +75,10 @@ var _ = Describe("Podman images", func() {
Expect(session.LineInOutputContainsTag("localhost/foo", "c")).To(BeTrue())
Expect(session.LineInOutputContainsTag("localhost/bar", "a")).To(BeTrue())
Expect(session.LineInOutputContainsTag("localhost/bar", "b")).To(BeTrue())
- session = podmanTest.PodmanNoCache([]string{"images", "-qn"})
+ session = podmanTest.Podman([]string{"images", "-qn"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
- Expect(len(session.OutputToStringArray())).To(BeNumerically("==", 3))
+ Expect(len(session.OutputToStringArray())).To(BeNumerically("==", 11))
})
It("podman images with digests", func() {
@@ -131,45 +119,46 @@ var _ = Describe("Podman images", func() {
})
It("podman images filter by image name", func() {
- podmanTest.RestoreAllArtifacts()
- session := podmanTest.PodmanNoCache([]string{"images", "-q", ALPINE})
+ podmanTest.AddImageToRWStore(ALPINE)
+ podmanTest.AddImageToRWStore(BB)
+
+ session := podmanTest.Podman([]string{"images", "-q", ALPINE})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
Expect(len(session.OutputToStringArray())).To(Equal(1))
- session = podmanTest.PodmanNoCache([]string{"tag", ALPINE, "foo:a"})
+ session = podmanTest.Podman([]string{"tag", ALPINE, "foo:a"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
- session = podmanTest.PodmanNoCache([]string{"tag", BB, "foo:b"})
+ session = podmanTest.Podman([]string{"tag", BB, "foo:b"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
- session = podmanTest.PodmanNoCache([]string{"images", "-q", "foo"})
+ session = podmanTest.Podman([]string{"images", "-q", "foo"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
Expect(len(session.OutputToStringArray())).To(Equal(2))
})
It("podman images filter reference", func() {
- podmanTest.RestoreAllArtifacts()
- result := podmanTest.PodmanNoCache([]string{"images", "-q", "-f", "reference=quay.io*"})
+ result := podmanTest.Podman([]string{"images", "-q", "-f", "reference=quay.io*"})
result.WaitWithDefaultTimeout()
Expect(result).Should(Exit(0))
- Expect(len(result.OutputToStringArray())).To(Equal(3))
+ Expect(len(result.OutputToStringArray())).To(Equal(8))
- retapline := podmanTest.PodmanNoCache([]string{"images", "-f", "reference=a*pine"})
+ retapline := podmanTest.Podman([]string{"images", "-f", "reference=a*pine"})
retapline.WaitWithDefaultTimeout()
Expect(retapline).Should(Exit(0))
- Expect(len(retapline.OutputToStringArray())).To(Equal(3))
+ Expect(len(retapline.OutputToStringArray())).To(Equal(6))
Expect(retapline.LineInOutputContains("alpine")).To(BeTrue())
- retapline = podmanTest.PodmanNoCache([]string{"images", "-f", "reference=alpine"})
+ retapline = podmanTest.Podman([]string{"images", "-f", "reference=alpine"})
retapline.WaitWithDefaultTimeout()
Expect(retapline).Should(Exit(0))
- Expect(len(retapline.OutputToStringArray())).To(Equal(3))
+ Expect(len(retapline.OutputToStringArray())).To(Equal(6))
Expect(retapline.LineInOutputContains("alpine")).To(BeTrue())
- retnone := podmanTest.PodmanNoCache([]string{"images", "-q", "-f", "reference=bogus"})
+ retnone := podmanTest.Podman([]string{"images", "-q", "-f", "reference=bogus"})
retnone.WaitWithDefaultTimeout()
Expect(retnone).Should(Exit(0))
Expect(len(retnone.OutputToStringArray())).To(Equal(0))
@@ -199,33 +188,23 @@ WORKDIR /test
})
It("podman images filter since image", func() {
- podmanTest.RestoreAllArtifacts()
- rmi := podmanTest.PodmanNoCache([]string{"rmi", "busybox"})
- rmi.WaitWithDefaultTimeout()
- Expect(rmi).Should(Exit(0))
-
dockerfile := `FROM quay.io/libpod/alpine:latest
`
podmanTest.BuildImage(dockerfile, "foobar.com/before:latest", "false")
- result := podmanTest.PodmanNoCache([]string{"images", "-q", "-f", "since=quay.io/libpod/alpine:latest"})
+ result := podmanTest.Podman([]string{"images", "-q", "-f", "since=quay.io/libpod/alpine:latest"})
result.WaitWithDefaultTimeout()
Expect(result).Should(Exit(0))
- Expect(len(result.OutputToStringArray())).To(Equal(0))
+ Expect(len(result.OutputToStringArray())).To(Equal(7))
})
It("podman image list filter after image", func() {
- podmanTest.RestoreAllArtifacts()
- rmi := podmanTest.PodmanNoCache([]string{"image", "rm", "busybox"})
- rmi.WaitWithDefaultTimeout()
- Expect(rmi).Should(Exit(0))
-
dockerfile := `FROM quay.io/libpod/alpine:latest
`
podmanTest.BuildImage(dockerfile, "foobar.com/before:latest", "false")
- result := podmanTest.PodmanNoCache([]string{"image", "list", "-q", "-f", "after=quay.io/libpod/alpine:latest"})
+ result := podmanTest.Podman([]string{"image", "list", "-q", "-f", "after=quay.io/libpod/alpine:latest"})
result.WaitWithDefaultTimeout()
Expect(result).Should(Exit(0))
- Expect(result.OutputToStringArray()).Should(HaveLen(0), "list filter output: %q", result.OutputToString())
+ Expect(result.OutputToStringArray()).Should(HaveLen(7), "list filter output: %q", result.OutputToString())
})
It("podman images filter dangling", func() {
@@ -341,22 +320,21 @@ WORKDIR /test
It("podman images --all flag", func() {
SkipIfRemote("FIXME This should work on podman-remote, problem is with podman-remote build")
- podmanTest.RestoreAllArtifacts()
dockerfile := `FROM quay.io/libpod/alpine:latest
RUN mkdir hello
RUN touch test.txt
ENV foo=bar
`
podmanTest.BuildImage(dockerfile, "test", "true")
- session := podmanTest.PodmanNoCache([]string{"images"})
+ session := podmanTest.Podman([]string{"images"})
session.WaitWithDefaultTimeout()
Expect(session).Should(Exit(0))
- Expect(len(session.OutputToStringArray())).To(Equal(5))
+ Expect(len(session.OutputToStringArray())).To(Equal(len(CACHE_IMAGES) + 2))
- session2 := podmanTest.PodmanNoCache([]string{"images", "--all"})
+ session2 := podmanTest.Podman([]string{"images", "--all"})
session2.WaitWithDefaultTimeout()
Expect(session2).Should(Exit(0))
- Expect(len(session2.OutputToStringArray())).To(Equal(7))
+ Expect(len(session2.OutputToStringArray())).To(Equal(len(CACHE_IMAGES) + 4))
})
It("podman images filter by label", func() {