summaryrefslogtreecommitdiff
path: root/test/e2e/rmi_test.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2018-12-04 13:13:57 -0800
committerGitHub <noreply@github.com>2018-12-04 13:13:57 -0800
commit320085a04d6db82421cf6c2870071ab2cb54d22b (patch)
treed17656deed0c382bb9fc520dfca2b34942e1f707 /test/e2e/rmi_test.go
parentaba52cf588f05a651d0d748224bfb2f807b40c7b (diff)
parent0cd83466db1e3dd998456dc80fc8fcd5a8936644 (diff)
downloadpodman-320085a04d6db82421cf6c2870071ab2cb54d22b.tar.gz
podman-320085a04d6db82421cf6c2870071ab2cb54d22b.tar.bz2
podman-320085a04d6db82421cf6c2870071ab2cb54d22b.zip
Merge pull request #1942 from baude/rmi_test
test for rmi with children
Diffstat (limited to 'test/e2e/rmi_test.go')
-rw-r--r--test/e2e/rmi_test.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/e2e/rmi_test.go b/test/e2e/rmi_test.go
index c2eb8b7d7..22bfbbe8c 100644
--- a/test/e2e/rmi_test.go
+++ b/test/e2e/rmi_test.go
@@ -250,4 +250,25 @@ var _ = Describe("Podman rmi", func() {
session2.WaitWithDefaultTimeout()
Expect(session2.ExitCode()).To(Equal(0))
})
+
+ It("podman rmi -a with parent|child images", func() {
+ dockerfile := `FROM docker.io/library/alpine:latest AS base
+RUN touch /1
+ENV LOCAL=/1
+RUN find $LOCAL
+FROM base
+RUN find $LOCAL
+
+`
+ podmanTest.BuildImage(dockerfile, "test", "true")
+ session := podmanTest.Podman([]string{"rmi", "-a"})
+ session.WaitWithDefaultTimeout()
+ fmt.Println(session.OutputToString())
+ Expect(session.ExitCode()).To(Equal(0))
+
+ images := podmanTest.Podman([]string{"images", "--all"})
+ images.WaitWithDefaultTimeout()
+ Expect(images.ExitCode()).To(Equal(0))
+ Expect(len(images.OutputToStringArray())).To(Equal(0))
+ })
})