summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-11-03 16:25:39 -0500
committerGitHub <noreply@github.com>2020-11-03 16:25:39 -0500
commit5f897d2abe960f2e29dd4ae87829c3c769a4423b (patch)
treed179cf321919b2cf4368d575b28ea8f81f5b9ddb /test/e2e
parent55433450c2b7c5fa8c3e5a7cd7aa529e6975d770 (diff)
parent532bce4ad434e302007c3d2adf9994b5a822cc19 (diff)
downloadpodman-5f897d2abe960f2e29dd4ae87829c3c769a4423b.tar.gz
podman-5f897d2abe960f2e29dd4ae87829c3c769a4423b.tar.bz2
podman-5f897d2abe960f2e29dd4ae87829c3c769a4423b.zip
Merge pull request #8232 from ashley-cui/volfilt
Make volume filters inclusive
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/volume_ls_test.go23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/e2e/volume_ls_test.go b/test/e2e/volume_ls_test.go
index 1cb6440aa..cda118bf1 100644
--- a/test/e2e/volume_ls_test.go
+++ b/test/e2e/volume_ls_test.go
@@ -110,4 +110,27 @@ var _ = Describe("Podman volume ls", func() {
Expect(lsDangling.ExitCode()).To(Equal(0))
Expect(lsDangling.OutputToString()).To(ContainSubstring(volName1))
})
+ It("podman ls volume with multiple --filter flag", func() {
+ session := podmanTest.Podman([]string{"volume", "create", "--label", "foo=bar", "myvol"})
+ volName := session.OutputToString()
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+
+ session = podmanTest.Podman([]string{"volume", "create", "--label", "foo2=bar2", "anothervol"})
+ anotherVol := session.OutputToString()
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+
+ session = podmanTest.Podman([]string{"volume", "create"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+
+ session = podmanTest.Podman([]string{"volume", "ls", "--filter", "label=foo", "--filter", "label=foo2"})
+ session.WaitWithDefaultTimeout()
+ Expect(session.ExitCode()).To(Equal(0))
+ Expect(len(session.OutputToStringArray())).To(Equal(3))
+ Expect(session.OutputToStringArray()[1]).To(ContainSubstring(volName))
+ Expect(session.OutputToStringArray()[2]).To(ContainSubstring(anotherVol))
+
+ })
})