From 4ddcbd7941e8cb32cbdcac2f1aa3a939e82be764 Mon Sep 17 00:00:00 2001 From: baude Date: Tue, 4 Sep 2018 12:33:29 -0500 Subject: rmi remove all not error when no images are present When running podman rm -a on a storage where no images exist, the exit code should NOT be non-zero. Signed-off-by: baude Closes: #1402 Approved by: rhatdan --- test/e2e/rmi_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/e2e') diff --git a/test/e2e/rmi_test.go b/test/e2e/rmi_test.go index 054b83431..8224cd345 100644 --- a/test/e2e/rmi_test.go +++ b/test/e2e/rmi_test.go @@ -238,4 +238,14 @@ var _ = Describe("Podman rmi", func() { Expect(session.ExitCode()).To(Equal(0)) Expect(len(session.OutputToString())).To(Equal(0)) }) + + It("podman rmi -a with no images should be exit 0", func() { + session := podmanTest.Podman([]string{"rmi", "-fa"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + + session2 := podmanTest.Podman([]string{"rmi", "-fa"}) + session2.WaitWithDefaultTimeout() + Expect(session2.ExitCode()).To(Equal(0)) + }) }) -- cgit v1.2.3-54-g00ecf