From e41279b902a334e53c56330a28f42d7a6027df74 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Sun, 24 Feb 2019 19:04:39 -0500 Subject: 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 --- test/e2e/rm_test.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/e2e') 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)) + }) }) -- cgit v1.2.3-54-g00ecf