diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-09-09 21:48:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-09 21:48:30 +0200 |
commit | 9a55bce9e4d7e1bb3d57dc8879e1a23f559e18ba (patch) | |
tree | b048b0e2228fa9ae67c9a73bd4fecf1739f64d75 /test/e2e | |
parent | 7042a3d7a539bae79ed63bdc87f432b8ec73afd8 (diff) | |
parent | 046178e55f72ed9db7cf5898d3be91b0112ab94f (diff) | |
download | podman-9a55bce9e4d7e1bb3d57dc8879e1a23f559e18ba.tar.gz podman-9a55bce9e4d7e1bb3d57dc8879e1a23f559e18ba.tar.bz2 podman-9a55bce9e4d7e1bb3d57dc8879e1a23f559e18ba.zip |
Merge pull request #3896 from mheon/volume_lookup
Add ability to look up volumes by unambiguous partial name
Diffstat (limited to 'test/e2e')
-rw-r--r-- | test/e2e/volume_rm_test.go | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/e2e/volume_rm_test.go b/test/e2e/volume_rm_test.go index 5dcf51ccd..61cf9b893 100644 --- a/test/e2e/volume_rm_test.go +++ b/test/e2e/volume_rm_test.go @@ -89,4 +89,38 @@ var _ = Describe("Podman volume rm", func() { Expect(session.ExitCode()).To(Equal(0)) Expect(len(session.OutputToStringArray())).To(Equal(0)) }) + + It("podman volume rm by partial name", func() { + session := podmanTest.Podman([]string{"volume", "create", "myvol"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + + session = podmanTest.Podman([]string{"volume", "rm", "myv"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + + session = podmanTest.Podman([]string{"volume", "ls"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + Expect(len(session.OutputToStringArray())).To(Equal(0)) + }) + + It("podman volume rm by nonunique partial name", func() { + session := podmanTest.Podman([]string{"volume", "create", "myvol1"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + + session = podmanTest.Podman([]string{"volume", "create", "myvol2"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + + session = podmanTest.Podman([]string{"volume", "rm", "myv"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Not(Equal(0))) + + session = podmanTest.Podman([]string{"volume", "ls"}) + session.WaitWithDefaultTimeout() + Expect(session.ExitCode()).To(Equal(0)) + Expect(len(session.OutputToStringArray()) >= 2).To(BeTrue()) + }) }) |