diff options
author | Paul Holzinger <paul.holzinger@web.de> | 2021-01-01 22:43:31 +0100 |
---|---|---|
committer | Paul Holzinger <paul.holzinger@web.de> | 2021-01-01 22:43:31 +0100 |
commit | f471fb4ce9d10dd523c3772ca9239ab1cfc8f4f4 (patch) | |
tree | f25d9ba4caa6d67f1a283d44afed87c30cd3b5c3 /test/apiv2 | |
parent | 39b1cb496766ec3be248f178375d663bc0a14f4a (diff) | |
download | podman-f471fb4ce9d10dd523c3772ca9239ab1cfc8f4f4.tar.gz podman-f471fb4ce9d10dd523c3772ca9239ab1cfc8f4f4.tar.bz2 podman-f471fb4ce9d10dd523c3772ca9239ab1cfc8f4f4.zip |
Compat api containers/json add support for filters
Fixes #8860
Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
Diffstat (limited to 'test/apiv2')
-rw-r--r-- | test/apiv2/20-containers.at | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/apiv2/20-containers.at b/test/apiv2/20-containers.at index bc6efc20d..decdc4754 100644 --- a/test/apiv2/20-containers.at +++ b/test/apiv2/20-containers.at @@ -203,6 +203,15 @@ t GET 'containers/json?limit=0&all=1' 200 \ .[0].Id~[0-9a-f]\\{64\\} \ .[1].Id~[0-9a-f]\\{64\\} +t GET containers/json?limit=2 200 length=2 + +# Filter with two ids should return both container +t GET "containers/json?filters=%7B%22id%22%3A%5B%22${cid}%22%2C%22${cid_top}%22%5D%7D&all=1" 200 length=2 +# Filter with two ids and status running should return only 1 container +t GET "containers/json?filters=%7B%22id%22%3A%5B%22${cid}%22%2C%22${cid_top}%22%5D%2C%22status%22%3A%5B%22running%22%5D%7D&all=1" 200 \ + length=1 \ + .[0].Id=${cid_top} + t POST containers/${cid_top}/stop "" 204 t DELETE containers/$cid 204 |