diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-09-23 20:57:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-23 20:57:51 +0200 |
commit | 4d475ae87bd67cc94f89d6ed63c0b06ac84315a1 (patch) | |
tree | 8775c52818b8939bbffcdae8b4131673e4f1a131 /test | |
parent | f658bbd230ed9cf6fbdabf5ddab5cfcf8f224636 (diff) | |
parent | dc05d1212c41d34f23d12cf1957917f5ce022f26 (diff) | |
download | podman-4d475ae87bd67cc94f89d6ed63c0b06ac84315a1.tar.gz podman-4d475ae87bd67cc94f89d6ed63c0b06ac84315a1.tar.bz2 podman-4d475ae87bd67cc94f89d6ed63c0b06ac84315a1.zip |
Merge pull request #15873 from ashley-cui/prettysecrets
Add --pretty to podman secret inspect
Diffstat (limited to 'test')
-rw-r--r-- | test/e2e/secret_test.go | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/test/e2e/secret_test.go b/test/e2e/secret_test.go index 286815e67..668a4943c 100644 --- a/test/e2e/secret_test.go +++ b/test/e2e/secret_test.go @@ -96,6 +96,23 @@ var _ = Describe("Podman secret", func() { Expect(inspect.OutputToString()).To(Equal(secrID)) }) + It("podman secret inspect with --pretty", func() { + secretFilePath := filepath.Join(podmanTest.TempDir, "secret") + err := os.WriteFile(secretFilePath, []byte("mysecret"), 0755) + Expect(err).To(BeNil()) + + session := podmanTest.Podman([]string{"secret", "create", "a", secretFilePath}) + session.WaitWithDefaultTimeout() + secrID := session.OutputToString() + Expect(session).Should(Exit(0)) + + inspect := podmanTest.Podman([]string{"secret", "inspect", "--pretty", secrID}) + inspect.WaitWithDefaultTimeout() + Expect(inspect).Should(Exit(0)) + Expect(inspect.OutputToString()).To(ContainSubstring("Name:")) + Expect(inspect.OutputToString()).To(ContainSubstring(secrID)) + }) + It("podman secret inspect multiple secrets", func() { secretFilePath := filepath.Join(podmanTest.TempDir, "secret") err := os.WriteFile(secretFilePath, []byte("mysecret"), 0755) @@ -125,7 +142,6 @@ var _ = Describe("Podman secret", func() { inspect := podmanTest.Podman([]string{"secret", "inspect", "bogus"}) inspect.WaitWithDefaultTimeout() Expect(inspect).To(ExitWithError()) - }) It("podman secret ls", func() { |