summaryrefslogtreecommitdiff
path: root/test/e2e/rm_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/e2e/rm_test.go')
-rw-r--r--test/e2e/rm_test.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/e2e/rm_test.go b/test/e2e/rm_test.go
index 1f67780da..9bf742a63 100644
--- a/test/e2e/rm_test.go
+++ b/test/e2e/rm_test.go
@@ -139,9 +139,23 @@ var _ = Describe("Podman rm", func() {
Expect(podmanTest.NumberOfContainers()).To(Equal(1))
})
+
It("podman rm bogus container", func() {
session := podmanTest.Podman([]string{"rm", "bogus"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(1))
})
+ It("podman rm bogus container and a running container", func() {
+ session := podmanTest.RunTopContainer("test1")
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+
+ session = podmanTest.Podman([]string{"rm", "bogus", "test1"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(125))
+
+ session = podmanTest.Podman([]string{"rm", "test1", "bogus"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(125))
+ })
})