diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2019-10-11 16:48:09 +0200 |
---|---|---|
committer | Giuseppe Scrivano <gscrivan@redhat.com> | 2019-10-11 16:52:18 +0200 |
commit | f7d55d64e7040cdad149684234ea150b0a90cf0e (patch) | |
tree | 11aa66b90a943ce7a6562d0e68252e57f40f2740 /test/e2e/ps_test.go | |
parent | 10cbaadf4ab1d2a644db79ed82e639c6ad279ba1 (diff) | |
download | podman-f7d55d64e7040cdad149684234ea150b0a90cf0e.tar.gz podman-f7d55d64e7040cdad149684234ea150b0a90cf0e.tar.bz2 podman-f7d55d64e7040cdad149684234ea150b0a90cf0e.zip |
container: initialize results list
it solves:
$ podman ps --format=json
null
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'test/e2e/ps_test.go')
-rw-r--r-- | test/e2e/ps_test.go | 7 |
1 files changed, 7 insertions, 0 deletions
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)) |