summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2019-10-11 21:38:31 +0200
committerGiuseppe Scrivano <gscrivan@redhat.com>2019-10-11 21:56:40 +0200
commit71410ff0738f69793cd282b2e9c341d56198cd98 (patch)
tree7296b3b580561c1fbe324275e5f38c93d7c9da8f /test
parentb0b350662173b3456224fa64a241d567943655b7 (diff)
downloadpodman-71410ff0738f69793cd282b2e9c341d56198cd98.tar.gz
podman-71410ff0738f69793cd282b2e9c341d56198cd98.tar.bz2
podman-71410ff0738f69793cd282b2e9c341d56198cd98.zip
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 <gscrivan@redhat.com>
Diffstat (limited to 'test')
-rw-r--r--test/e2e/images_test.go7
1 files changed, 7 insertions, 0 deletions
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()