diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-10-02 14:49:02 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-02 14:49:02 -0400 |
commit | f1cdead33d8f9c29348f9a66ba4a6aa5ed0aa7b2 (patch) | |
tree | 1485fd4238fa9d3b8d64e1d13e54f0015300aeb7 /test/e2e | |
parent | 1e162edc8a2dd3d8373128e671c578ffcad52272 (diff) | |
parent | c0757374bf187edcf4ae8c4811e162e27794ebf8 (diff) | |
download | podman-f1cdead33d8f9c29348f9a66ba4a6aa5ed0aa7b2.tar.gz podman-f1cdead33d8f9c29348f9a66ba4a6aa5ed0aa7b2.tar.bz2 podman-f1cdead33d8f9c29348f9a66ba4a6aa5ed0aa7b2.zip |
Merge pull request #7199 from jwhonce/jira/run-898
Restore "table" --format from V1
Diffstat (limited to 'test/e2e')
-rw-r--r-- | test/e2e/info_test.go | 10 | ||||
-rw-r--r-- | test/e2e/version_test.go | 11 |
2 files changed, 13 insertions, 8 deletions
diff --git a/test/e2e/info_test.go b/test/e2e/info_test.go index bcbfdd80a..49f5f0ce6 100644 --- a/test/e2e/info_test.go +++ b/test/e2e/info_test.go @@ -50,15 +50,17 @@ var _ = Describe("Podman Info", func() { {"{{ json .}}", true, 0}, {"{{json . }}", true, 0}, {" {{ json . }} ", true, 0}, - {"{{json }}", false, 125}, + {"{{json }}", true, 0}, {"{{json .", false, 125}, - {"json . }}", false, 0}, // Note: this does NOT fail but produces garbage + {"json . }}", false, 0}, // without opening {{ template seen as string literal } for _, tt := range tests { session := podmanTest.Podman([]string{"info", "--format", tt.input}) session.WaitWithDefaultTimeout() - Expect(session).Should(Exit(tt.exitCode)) - Expect(session.IsJSONOutputValid()).To(Equal(tt.success)) + + desc := fmt.Sprintf("JSON test(%q)", tt.input) + Expect(session).Should(Exit(tt.exitCode), desc) + Expect(session.IsJSONOutputValid()).To(Equal(tt.success), desc) } }) diff --git a/test/e2e/version_test.go b/test/e2e/version_test.go index 695cccc11..903748b58 100644 --- a/test/e2e/version_test.go +++ b/test/e2e/version_test.go @@ -1,6 +1,7 @@ package integration import ( + "fmt" "os" . "github.com/containers/podman/v2/test/utils" @@ -68,15 +69,17 @@ var _ = Describe("Podman version", func() { {"{{ json .}}", true, 0}, {"{{json . }}", true, 0}, {" {{ json . }} ", true, 0}, - {"{{json }}", false, 125}, + {"{{json }}", true, 0}, {"{{json .", false, 125}, - {"json . }}", false, 0}, // Note: this does NOT fail but produces garbage + {"json . }}", false, 0}, // without opening {{ template seen as string literal } for _, tt := range tests { session := podmanTest.Podman([]string{"version", "--format", tt.input}) session.WaitWithDefaultTimeout() - Expect(session).Should(Exit(tt.exitCode)) - Expect(session.IsJSONOutputValid()).To(Equal(tt.success)) + + desc := fmt.Sprintf("JSON test(%q)", tt.input) + Expect(session).Should(Exit(tt.exitCode), desc) + Expect(session.IsJSONOutputValid()).To(Equal(tt.success), desc) } }) |