summaryrefslogtreecommitdiff
path: root/test/e2e/images_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/e2e/images_test.go')
-rw-r--r--test/e2e/images_test.go39
1 files changed, 36 insertions, 3 deletions
diff --git a/test/e2e/images_test.go b/test/e2e/images_test.go
index b22964dc1..ddf2e20b8 100644
--- a/test/e2e/images_test.go
+++ b/test/e2e/images_test.go
@@ -185,6 +185,7 @@ RUN apk update && apk add strace
result.WaitWithDefaultTimeout()
Expect(result).Should(Exit(0))
Expect(len(result.OutputToStringArray()) >= 1).To(BeTrue())
+
})
It("podman images workingdir from image", func() {
@@ -226,7 +227,7 @@ WORKDIR /test
result := podmanTest.PodmanNoCache([]string{"image", "list", "-q", "-f", "after=docker.io/library/alpine:latest"})
result.WaitWithDefaultTimeout()
Expect(result).Should(Exit(0))
- Expect(len(result.OutputToStringArray())).To(Equal(0))
+ Expect(result.OutputToStringArray()).Should(HaveLen(0), "list filter output: %q", result.OutputToString())
})
It("podman images filter dangling", func() {
@@ -236,8 +237,40 @@ WORKDIR /test
podmanTest.BuildImage(dockerfile, "foobar.com/before:latest", "false")
result := podmanTest.Podman([]string{"images", "-q", "-f", "dangling=true"})
result.WaitWithDefaultTimeout()
- Expect(result).Should(Exit(0))
- Expect(len(result.OutputToStringArray())).To(Equal(0))
+ Expect(result).Should(Exit(0), "dangling image output: %q", result.OutputToString())
+ Expect(result.OutputToStringArray()).Should(HaveLen(0), "dangling image output: %q", result.OutputToString())
+ })
+
+ It("podman pull by digest and list --all", func() {
+ // Prevent regressing on issue #7651.
+ digestPullAndList := func(noneTag bool) {
+ session := podmanTest.Podman([]string{"pull", ALPINEAMD64DIGEST})
+ session.WaitWithDefaultTimeout()
+ Expect(session).Should(Exit(0))
+
+ result := podmanTest.Podman([]string{"images", "--all", ALPINEAMD64DIGEST})
+ result.WaitWithDefaultTimeout()
+ Expect(result).Should(Exit(0))
+
+ found, _ := result.GrepString("<none>")
+ if noneTag {
+ Expect(found).To(BeTrue())
+ } else {
+ Expect(found).To(BeFalse())
+ }
+ }
+ // No "<none>" tag as tagged alpine instances should be present.
+ session := podmanTest.Podman([]string{"pull", ALPINELISTTAG})
+ session.WaitWithDefaultTimeout()
+ Expect(session).Should(Exit(0))
+ digestPullAndList(false)
+
+ // Now remove all images, re-pull by digest and check for the "<none>" tag.
+ session = podmanTest.Podman([]string{"rmi", "-af"})
+ session.WaitWithDefaultTimeout()
+ Expect(session).Should(Exit(0))
+
+ digestPullAndList(true)
})
It("podman check for image with sha256: prefix", func() {