summaryrefslogtreecommitdiff
path: root/test/e2e/images_test.go
diff options
context:
space:
mode:
authorumohnani8 <umohnani@redhat.com>2018-06-14 14:53:59 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-06-18 14:41:51 +0000
commitdb094f6e15d3e63772d4346b0176cb6fc682b2fc (patch)
treea48a5eff164c91be48919e436eb3a3f9c58b96b8 /test/e2e/images_test.go
parent4d3db1b4a9ec1a1a2aa74e3da0102b6017f8a328 (diff)
downloadpodman-db094f6e15d3e63772d4346b0176cb6fc682b2fc.tar.gz
podman-db094f6e15d3e63772d4346b0176cb6fc682b2fc.tar.bz2
podman-db094f6e15d3e63772d4346b0176cb6fc682b2fc.zip
Add --all,-a flag to podman images
podman images will not show intermediate images by default. To view all images, including intermediate images created during a build, use the --all flag. Signed-off-by: umohnani8 <umohnani@redhat.com> Closes: #947 Approved by: rhatdan
Diffstat (limited to 'test/e2e/images_test.go')
-rw-r--r--test/e2e/images_test.go26
1 files changed, 22 insertions, 4 deletions
diff --git a/test/e2e/images_test.go b/test/e2e/images_test.go
index 5e30e95ec..c04ae91bd 100644
--- a/test/e2e/images_test.go
+++ b/test/e2e/images_test.go
@@ -100,7 +100,7 @@ var _ = Describe("Podman images", func() {
It("podman images filter before image", func() {
dockerfile := `FROM docker.io/library/alpine:latest
`
- podmanTest.BuildImage(dockerfile, "foobar.com/before:latest")
+ podmanTest.BuildImage(dockerfile, "foobar.com/before:latest", "false")
result := podmanTest.Podman([]string{"images", "-q", "-f", "before=foobar.com/before:latest"})
result.WaitWithDefaultTimeout()
Expect(result.ExitCode()).To(Equal(0))
@@ -114,7 +114,7 @@ var _ = Describe("Podman images", func() {
dockerfile := `FROM docker.io/library/alpine:latest
`
- podmanTest.BuildImage(dockerfile, "foobar.com/before:latest")
+ podmanTest.BuildImage(dockerfile, "foobar.com/before:latest", "false")
result := podmanTest.Podman([]string{"images", "-q", "-f", "after=docker.io/library/alpine:latest"})
result.WaitWithDefaultTimeout()
Expect(result.ExitCode()).To(Equal(0))
@@ -124,8 +124,8 @@ var _ = Describe("Podman images", func() {
It("podman images filter dangling", func() {
dockerfile := `FROM docker.io/library/alpine:latest
`
- podmanTest.BuildImage(dockerfile, "foobar.com/before:latest")
- podmanTest.BuildImage(dockerfile, "foobar.com/before:latest")
+ podmanTest.BuildImage(dockerfile, "foobar.com/before:latest", "false")
+ podmanTest.BuildImage(dockerfile, "foobar.com/before:latest", "false")
result := podmanTest.Podman([]string{"images", "-q", "-f", "dangling=true"})
result.WaitWithDefaultTimeout()
Expect(result.ExitCode()).To(Equal(0))
@@ -165,4 +165,22 @@ var _ = Describe("Podman images", func() {
return size1 < size2
})).To(BeTrue())
})
+
+ It("podman images --all flag", func() {
+ dockerfile := `FROM docker.io/library/alpine:latest
+RUN mkdir hello
+RUN touch test.txt
+ENV foo=bar
+`
+ podmanTest.BuildImage(dockerfile, "test", "true")
+ session := podmanTest.Podman([]string{"images"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(len(session.OutputToStringArray())).To(Equal(4))
+
+ session2 := podmanTest.Podman([]string{"images", "--all"})
+ session2.WaitWithDefaultTimeout()
+ Expect(session2.ExitCode()).To(Equal(0))
+ Expect(len(session2.OutputToStringArray())).To(Equal(6))
+ })
})