From f7d55d64e7040cdad149684234ea150b0a90cf0e Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Fri, 11 Oct 2019 16:48:09 +0200 Subject: container: initialize results list it solves: $ podman ps --format=json null Signed-off-by: Giuseppe Scrivano --- test/e2e/ps_test.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test') diff --git a/test/e2e/ps_test.go b/test/e2e/ps_test.go index efcf44f76..34f0692b2 100644 --- a/test/e2e/ps_test.go +++ b/test/e2e/ps_test.go @@ -151,6 +151,13 @@ var _ = Describe("Podman ps", func() { Expect(len(result.OutputToStringArray())).Should(BeNumerically(">", 0)) }) + It("podman ps with no containers is valid json format", func() { + result := podmanTest.Podman([]string{"ps", "--format", "json"}) + result.WaitWithDefaultTimeout() + Expect(result.ExitCode()).To(Equal(0)) + Expect(result.IsJSONOutputValid()).To(BeTrue()) + }) + It("podman ps namespace flag with json format", func() { _, ec, _ := podmanTest.RunLsContainer("test1") Expect(ec).To(Equal(0)) -- cgit v1.2.3-54-g00ecf