diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-09-30 11:33:19 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-30 11:33:19 +0000 |
commit | 08d036cbd4225a9802fb8dc7c4da7b53ded3896a (patch) | |
tree | b38e8fa39f94589bfdaf90444d3dfe1dce4b41e8 /test/e2e/volume_rm_test.go | |
parent | 19f080f1af884c1e36f55dc81cd51b0ac91a868a (diff) | |
parent | 22474095abe39c14c902650b08002c0bc89e7e6a (diff) | |
download | podman-08d036cbd4225a9802fb8dc7c4da7b53ded3896a.tar.gz podman-08d036cbd4225a9802fb8dc7c4da7b53ded3896a.tar.bz2 podman-08d036cbd4225a9802fb8dc7c4da7b53ded3896a.zip |
Merge pull request #7825 from rhatdan/exitcode
Fix handling of remove of bogus volumes, networks and Pods
Diffstat (limited to 'test/e2e/volume_rm_test.go')
-rw-r--r-- | test/e2e/volume_rm_test.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/e2e/volume_rm_test.go b/test/e2e/volume_rm_test.go index a072bc824..cdced1f13 100644 --- a/test/e2e/volume_rm_test.go +++ b/test/e2e/volume_rm_test.go @@ -55,7 +55,7 @@ var _ = Describe("Podman volume rm", func() { session = podmanTest.Podman([]string{"volume", "rm", "myvol"}) session.WaitWithDefaultTimeout() - Expect(session).To(ExitWithError()) + Expect(session.ExitCode()).To(Equal(2)) Expect(session.ErrorToString()).To(ContainSubstring(cid)) session = podmanTest.Podman([]string{"volume", "rm", "-f", "myvol"}) @@ -70,6 +70,12 @@ var _ = Describe("Podman volume rm", func() { podmanTest.Cleanup() }) + It("podman volume remove bogus", func() { + session := podmanTest.Podman([]string{"volume", "rm", "bogus"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(1)) + }) + It("podman rm with --all flag", func() { session := podmanTest.Podman([]string{"volume", "create", "myvol"}) session.WaitWithDefaultTimeout() |