summaryrefslogtreecommitdiff
path: root/test/apiv2/20-containers.at
diff options
context:
space:
mode:
Diffstat (limited to 'test/apiv2/20-containers.at')
-rw-r--r--test/apiv2/20-containers.at16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/apiv2/20-containers.at b/test/apiv2/20-containers.at
index 4b40fde80..f73d03123 100644
--- a/test/apiv2/20-containers.at
+++ b/test/apiv2/20-containers.at
@@ -31,6 +31,13 @@ t GET libpod/containers/json?all=true 200 \
.[0].ExitCode=0 \
.[0].IsInfra=false
+# Test compat API for Network Settings
+t GET /containers/json?all=true 200 \
+ length=1 \
+ .[0].Id~[0-9a-f]\\{64\\} \
+ .[0].Image=$IMAGE \
+ .[0].NetworkSettings.Networks.podman.NetworkID=podman
+
# Make sure `limit` works.
t GET libpod/containers/json?limit=1 200 \
length=1 \
@@ -256,3 +263,12 @@ t GET containers/json 200 \
.[0].Ports[0].Type="tcp"
podman stop bar
+
+# Test CPU limit (NanoCPUs)
+t POST containers/create '"Image":"'$IMAGE'","HostConfig":{"NanoCpus":500000}' 201 \
+ .Id~[0-9a-f]\\{64\\}
+cid=$(jq -r '.Id' <<<"$output")
+t GET containers/$cid/json 200 \
+ .HostConfig.NanoCpus=500000
+
+t DELETE containers/$cid?v=true 204