mirror of
https://github.com/containers/podman.git
synced 2025-12-01 18:49:18 +08:00
secret: add support for --ignore with rm
Signed-off-by: danishprakash <danish.prakash@suse.com>
This commit is contained in:
@@ -336,6 +336,18 @@ var _ = Describe("Podman secret", func() {
|
||||
Expect(session.OutputToStringArray()).To(HaveLen(1))
|
||||
})
|
||||
|
||||
It("podman secret rm --ignore", func() {
|
||||
remove := podmanTest.Podman([]string{"secret", "rm", "non-existent-secret"})
|
||||
remove.WaitWithDefaultTimeout()
|
||||
Expect(remove).Should(Not(Exit(0)))
|
||||
Expect(remove.ErrorToString()).To(Equal("Error: no secret with name or id \"non-existent-secret\": no such secret"))
|
||||
|
||||
ignoreRm := podmanTest.Podman([]string{"secret", "rm", "--ignore", "non-existent-secret"})
|
||||
ignoreRm.WaitWithDefaultTimeout()
|
||||
Expect(ignoreRm).Should(Exit(0))
|
||||
Expect(ignoreRm.ErrorToString()).To(BeEmpty())
|
||||
})
|
||||
|
||||
It("podman secret creates from environment variable", func() {
|
||||
// no env variable set, should fail
|
||||
session := podmanTest.Podman([]string{"secret", "create", "--env", "a", "MYENVVAR"})
|
||||
|
||||
Reference in New Issue
Block a user