diff options
author | Aditya Rajan <arajan@redhat.com> | 2021-11-15 16:47:08 +0530 |
---|---|---|
committer | Aditya Rajan <arajan@redhat.com> | 2021-11-15 17:49:54 +0530 |
commit | c050f05ccff6416ccd41d271f0051b395cbe5a1f (patch) | |
tree | e0f22c476ab3939015321b338145768c53ba89f4 /test | |
parent | cca6df428cb9ce187ae1341740ac1137c7a67a75 (diff) | |
download | podman-c050f05ccff6416ccd41d271f0051b395cbe5a1f.tar.gz podman-c050f05ccff6416ccd41d271f0051b395cbe5a1f.tar.bz2 podman-c050f05ccff6416ccd41d271f0051b395cbe5a1f.zip |
filter: add basic pattern matching for label keys
Following PR adds basic pattern matching to filter by labels for `keys`.
Adds support for use-cases like `--filter label=some.prefix.com/key/*`
where end-users want to match a pattern for keys as compared to exact
value.
Signed-off-by: Aditya Rajan <arajan@redhat.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/e2e/volume_ls_test.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/e2e/volume_ls_test.go b/test/e2e/volume_ls_test.go index 0dd1a2b7c..6c4b22fa5 100644 --- a/test/e2e/volume_ls_test.go +++ b/test/e2e/volume_ls_test.go @@ -45,6 +45,17 @@ var _ = Describe("Podman volume ls", func() { Expect(len(session.OutputToStringArray())).To(Equal(2)) }) + It("podman ls volume filter with a key pattern", func() { + session := podmanTest.Podman([]string{"volume", "create", "--label", "helloworld=world", "myvol2"}) + session.WaitWithDefaultTimeout() + Expect(session).Should(Exit(0)) + + session = podmanTest.Podman([]string{"volume", "ls", "--filter", "label=hello*"}) + session.WaitWithDefaultTimeout() + Expect(session).Should(Exit(0)) + Expect(len(session.OutputToStringArray())).To(Equal(2)) + }) + It("podman ls volume with JSON format", func() { session := podmanTest.Podman([]string{"volume", "create", "myvol"}) session.WaitWithDefaultTimeout() |