diff options
author | Paul Holzinger <paul.holzinger@web.de> | 2020-10-15 11:11:48 +0200 |
---|---|---|
committer | Paul Holzinger <paul.holzinger@web.de> | 2020-10-15 19:04:57 +0200 |
commit | a261819183c9f9b7a76a8e9e278b30486aa1fe2c (patch) | |
tree | 2d2c7acb55e5cdd6ef793aabb1df89bffd123773 /test/e2e/trust_test.go | |
parent | 41eda417fe4565cab26d704daedca0d285327f31 (diff) | |
download | podman-a261819183c9f9b7a76a8e9e278b30486aa1fe2c.tar.gz podman-a261819183c9f9b7a76a8e9e278b30486aa1fe2c.tar.bz2 podman-a261819183c9f9b7a76a8e9e278b30486aa1fe2c.zip |
Fix podman image trust show --raw output
Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
Diffstat (limited to 'test/e2e/trust_test.go')
-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")) + }) }) |