summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2019-03-18 09:37:01 -0500
committerbaude <bbaude@redhat.com>2019-03-18 13:46:35 -0500
commit6aa8d14745dd778211fcf2941ce8fe5b5a95d5d9 (patch)
tree41cb96bdeb70ded51f28fcca2e90f07c49beff0c /test/e2e
parentea54a1c2f51d3173649277939738ce9b1c392076 (diff)
downloadpodman-6aa8d14745dd778211fcf2941ce8fe5b5a95d5d9.tar.gz
podman-6aa8d14745dd778211fcf2941ce8fe5b5a95d5d9.tar.bz2
podman-6aa8d14745dd778211fcf2941ce8fe5b5a95d5d9.zip
support GO template {{ json . }}
for podman version, we now support a GO template for json output. fixes #2671 Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/version_test.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/e2e/version_test.go b/test/e2e/version_test.go
index b66291734..f546158a9 100644
--- a/test/e2e/version_test.go
+++ b/test/e2e/version_test.go
@@ -36,4 +36,24 @@ var _ = Describe("Podman version", func() {
Expect(session.ExitCode()).To(Equal(0))
Expect(len(session.OutputToStringArray())).To(BeNumerically(">", 2))
})
+
+ It("podman version --format json", func() {
+ session := podmanTest.Podman([]string{"version", "--format", "json"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(session.IsJSONOutputValid()).To(BeTrue())
+ })
+
+ It("podman version --format json", func() {
+ session := podmanTest.Podman([]string{"version", "--format", "{{ json .}}"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(session.IsJSONOutputValid()).To(BeTrue())
+ })
+
+ It("podman version --format GO template", func() {
+ session := podmanTest.Podman([]string{"version", "--format", "{{ .Version }}"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ })
})