mirror of
https://github.com/containers/podman.git
synced 2025-09-09 21:52:21 +08:00
Make volume filters inclusive
When using multiple filters, return a volume that matches any one of the used filters, rather than matching both of the filters. This is for compatibility with docker's cli, and more importantly, the apiv2 compat endpoint Closes #6765 Signed-off-by: Ashley Cui <acui@redhat.com>
This commit is contained in:
@ -35,6 +35,8 @@ t GET libpod/volumes/json 200 \
|
||||
.[0].CreatedAt~[0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}.*
|
||||
# -G --data-urlencode 'filters={"name":["foo1"]}'
|
||||
t GET libpod/volumes/json?filters=%7B%22name%22%3A%5B%22foo1%22%5D%7D 200 length=1 .[0].Name=foo1
|
||||
# -G --data-urlencode 'filters={"name":["foo1","foo2"]}'
|
||||
t GET libpod/volumes/json?filters=%7B%22name%22%3A%20%5B%22foo1%22%2C%20%22foo2%22%5D%7D 200 length=2 .[0].Name=foo1 .[1].Name=foo2
|
||||
# -G --data-urlencode 'filters={"name":["notexist"]}'
|
||||
t GET libpod/volumes/json?filters=%7B%22name%22%3A%5B%22notexists%22%5D%7D 200 length=0
|
||||
|
||||
|
Reference in New Issue
Block a user