summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-07-09 19:28:38 +0200
committerGitHub <noreply@github.com>2020-07-09 19:28:38 +0200
commit059bd37511e917f860e784307ee1f2766d8d4ec3 (patch)
tree125543a13506172fdc2f6167a346b868b20293d6 /test
parentbc3b3b373fab58929f4583ab0b5eb529e64a54fc (diff)
parent2086e22624ed791e1e2a391346055a3a54d2b95c (diff)
downloadpodman-059bd37511e917f860e784307ee1f2766d8d4ec3.tar.gz
podman-059bd37511e917f860e784307ee1f2766d8d4ec3.tar.bz2
podman-059bd37511e917f860e784307ee1f2766d8d4ec3.zip
Merge pull request #6835 from zhangguanzhang/master
fix API: Create container with an invalid configuration
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 25843e61c..9a1db5154 100644
--- a/test/apiv2/20-containers.at
+++ b/test/apiv2/20-containers.at
@@ -51,6 +51,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 \