summaryrefslogtreecommitdiff
path: root/test/e2e/run_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/e2e/run_test.go')
-rw-r--r--test/e2e/run_test.go27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/e2e/run_test.go b/test/e2e/run_test.go
index 4a9bd4e46..2104991b2 100644
--- a/test/e2e/run_test.go
+++ b/test/e2e/run_test.go
@@ -639,4 +639,31 @@ USER mail`
match, _ := check.GrepString("foobar")
Expect(match).To(BeTrue())
})
+
+ It("podman run --rm should work", func() {
+ session := podmanTest.Podman([]string{"run", "--rm", ALPINE, "ls"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+
+ numContainers := podmanTest.NumberOfContainers()
+ Expect(numContainers).To(Equal(0))
+ })
+
+ It("podman run --rm failed container should delete itself", func() {
+ session := podmanTest.Podman([]string{"run", "--rm", ALPINE, "foo"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Not(Equal(0)))
+
+ numContainers := podmanTest.NumberOfContainers()
+ Expect(numContainers).To(Equal(0))
+ })
+
+ It("podman run failed container should NOT delete itself", func() {
+ session := podmanTest.Podman([]string{"run", ALPINE, "foo"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Not(Equal(0)))
+
+ numContainers := podmanTest.NumberOfContainers()
+ Expect(numContainers).To(Equal(1))
+ })
})