diff options
author | zhangguanzhang <zhangguanzhang@qq.com> | 2020-09-23 13:21:23 +0800 |
---|---|---|
committer | zhangguanzhang <zhangguanzhang@qq.com> | 2020-09-24 08:54:46 +0800 |
commit | 873989f7a413ee8acc5e137577dfaa4d38f94fbd (patch) | |
tree | 285203d9e0e799327145c9ca3975f81a8cd42971 /test/apiv2/20-containers.at | |
parent | 5cedd830f7275e8dc3382502908b846bfa57a3b8 (diff) | |
download | podman-873989f7a413ee8acc5e137577dfaa4d38f94fbd.tar.gz podman-873989f7a413ee8acc5e137577dfaa4d38f94fbd.tar.bz2 podman-873989f7a413ee8acc5e137577dfaa4d38f94fbd.zip |
apiv2 container limit differ from docker-api
Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
Diffstat (limited to 'test/apiv2/20-containers.at')
-rw-r--r-- | test/apiv2/20-containers.at | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/apiv2/20-containers.at b/test/apiv2/20-containers.at index 9ea3cb7ed..187073fb9 100644 --- a/test/apiv2/20-containers.at +++ b/test/apiv2/20-containers.at @@ -176,6 +176,31 @@ t GET containers/$cid/json 200 \ .Config.Cmd='[]' \ .Path="echo" \ .Args[0]="param1" + +# create a running container for after +t POST containers/create '"Image":"'$IMAGE'","Entrypoint":["top"]' 201 \ + .Id~[0-9a-f]\\{64\\} +cid_top=$(jq -r '.Id' <<<"$output") +t GET containers/${cid_top}/json 200 \ + .Config.Entrypoint[0]="top" \ + .Config.Cmd='[]' \ + .Path="top" +t POST containers/${cid_top}/start '' 204 +# make sure the container is running +t GET containers/${cid_top}/json 200 \ + .State.Status="running" + +# 0 means unlimited, need same with docker +t GET containers/json?limit=0 200 \ + .[0].Id~[0-9a-f]\\{64\\} + +t GET 'containers/json?limit=0&all=1' 200 \ + .[0].Id~[0-9a-f]\\{64\\} \ + .[1].Id~[0-9a-f]\\{64\\} + +t POST containers/${cid_top}/stop "" 204 + t DELETE containers/$cid 204 +t DELETE containers/$cid_top 204 # vim: filetype=sh |