aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2019-02-24 19:04:39 -0500
committerDaniel J Walsh <dwalsh@redhat.com>2019-02-25 10:31:04 -0500
commite41279b902a334e53c56330a28f42d7a6027df74 (patch)
tree1c74f918827bec245e8c136f832aab8a34186cda /test
parent9e70411ffc24732049e133c83873f7834edf7c0a (diff)
downloadpodman-e41279b902a334e53c56330a28f42d7a6027df74.tar.gz
podman-e41279b902a334e53c56330a28f42d7a6027df74.tar.bz2
podman-e41279b902a334e53c56330a28f42d7a6027df74.zip
Change exit code to 1 on podman rm nosuch container
Make it easy for scripts to determine if a container removal fails versus the container did not exist. If only errors were no such container exit with 1 versus 125. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'test')
-rw-r--r--test/e2e/rm_test.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/e2e/rm_test.go b/test/e2e/rm_test.go
index bc1431bce..71dacfa80 100644
--- a/test/e2e/rm_test.go
+++ b/test/e2e/rm_test.go
@@ -128,4 +128,9 @@ 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))
+ })
})