aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorzhangguanzhang <zhangguanzhang@qq.com>2020-07-07 23:58:37 +0800
committerMatthew Heon <matthew.heon@pm.me>2020-07-22 14:48:01 -0400
commitf9526cf02b76f1c006bd344d05e8a40bfe94dbe9 (patch)
tree4b26a79efca646f957250f0b58c131ce546902e4 /test
parentf9eb204d0ddb7e0d5fbffc849bd0ca10e2b17a29 (diff)
downloadpodman-f9526cf02b76f1c006bd344d05e8a40bfe94dbe9.tar.gz
podman-f9526cf02b76f1c006bd344d05e8a40bfe94dbe9.tar.bz2
podman-f9526cf02b76f1c006bd344d05e8a40bfe94dbe9.zip
fix API: Create container with an invalid configuration
Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
Diffstat (limited to 'test')
-rw-r--r--test/apiv2/20-containers.at13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/apiv2/20-containers.at b/test/apiv2/20-containers.at
index 60f6d97aa..ec50e659f 100644
--- a/test/apiv2/20-containers.at
+++ b/test/apiv2/20-containers.at
@@ -30,6 +30,19 @@ cid=$(jq -r '.[0].Id' <<<"$output")
t DELETE libpod/containers/$cid 204
+# Ensure that API does not occur: Create Container creates an invalid and the container fails to start
+# https://github.com/containers/libpod/issues/6799
+CNAME=testArgs
+t POST libpod/containers/create?name=${CNAME} Image=${IMAGE} 201 \
+ .Id~[0-9a-f]\\{64\\}
+t GET libpod/containers/json?limit=1 200 \
+ length=1 \
+ .[0].Id~[0-9a-f]\\{64\\}
+cid=$(jq -r '.[0].Id' <<<"$output")
+# This step should start the container properly
+t POST libpod/containers/${cid}/start '' 204
+t DELETE libpod/containers/$cid 204
+
CNAME=myfoo
podman run --name $CNAME $IMAGE -td top
t GET libpod/containers/json?all=true 200 \