mirror of
https://github.com/containers/podman.git
synced 2025-06-03 20:33:20 +08:00
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>
This commit is contained in:
@ -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()
|
||||
|
Reference in New Issue
Block a user