summaryrefslogtreecommitdiff
path: root/test/e2e/secret_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'test/e2e/secret_test.go')
-rw-r--r--test/e2e/secret_test.go18
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() {