From 71410ff0738f69793cd282b2e9c341d56198cd98 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Fri, 11 Oct 2019 21:38:31 +0200 Subject: images: empty list is valid json with --format=json similar change to f7d55d64e7040cdad149684234ea150b0a90cf0e with images --format=json, be sure the output is valid json also when it is an empty list. Signed-off-by: Giuseppe Scrivano --- test/e2e/images_test.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/e2e') diff --git a/test/e2e/images_test.go b/test/e2e/images_test.go index 8203e4273..e125c62b4 100644 --- a/test/e2e/images_test.go +++ b/test/e2e/images_test.go @@ -101,6 +101,13 @@ var _ = Describe("Podman images", func() { Expect(session.LineInOuputStartsWith("docker.io/library/busybox")).To(BeTrue()) }) + It("podman empty images list in JSON format", func() { + session := podmanTest.Podman([]string{"images", "--format=json", "not-existing-image"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + Expect(session.IsJSONOutputValid()).To(BeTrue()) + }) + It("podman images in JSON format", func() { session := podmanTest.Podman([]string{"images", "--format=json"}) session.WaitWithDefaultTimeout() -- cgit v1.2.3-54-g00ecf