diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-10-16 05:49:49 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-16 05:49:49 -0400 |
commit | fe1b6ccc85781a45d06303e986b1da573c828d2c (patch) | |
tree | bec38486f65b5314e2f2faf6b4998b560a72e457 /test | |
parent | c3ecdd09ed6a9b17da9879d7f2765a6f5f3ace8a (diff) | |
parent | a261819183c9f9b7a76a8e9e278b30486aa1fe2c (diff) | |
download | podman-fe1b6ccc85781a45d06303e986b1da573c828d2c.tar.gz podman-fe1b6ccc85781a45d06303e986b1da573c828d2c.tar.bz2 podman-fe1b6ccc85781a45d06303e986b1da573c828d2c.zip |
Merge pull request #8029 from Luap99/image-trust-show-raw
Fix podman image trust show --raw output
Diffstat (limited to 'test')
-rw-r--r-- | test/e2e/trust_test.go | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/e2e/trust_test.go b/test/e2e/trust_test.go index 82b0f9f26..987023e4c 100644 --- a/test/e2e/trust_test.go +++ b/test/e2e/trust_test.go @@ -74,4 +74,26 @@ var _ = Describe("Podman trust", func() { } Expect(teststruct["default"][0]["type"]).To(Equal("insecureAcceptAnything")) }) + + It("podman image trust show --json", func() { + session := podmanTest.Podman([]string{"image", "trust", "show", "--json"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + Expect(session.IsJSONOutputValid()).To(BeTrue()) + var teststruct []map[string]string + json.Unmarshal(session.Out.Contents(), &teststruct) + Expect(teststruct[0]["name"]).To(Equal("* (default)")) + Expect(teststruct[0]["repo_name"]).To(Equal("default")) + Expect(teststruct[0]["type"]).To(Equal("accept")) + Expect(teststruct[1]["type"]).To(Equal("insecureAcceptAnything")) + }) + + It("podman image trust show --raw", func() { + session := podmanTest.Podman([]string{"image", "trust", "show", "--raw"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + Expect(session.IsJSONOutputValid()).To(BeTrue()) + Expect(session.OutputToString()).To(ContainSubstring("default")) + Expect(session.OutputToString()).To(ContainSubstring("insecureAcceptAnything")) + }) }) |