aboutsummaryrefslogtreecommitdiff
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.at15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/apiv2/20-containers.at b/test/apiv2/20-containers.at
index 253bb2e45..9ace46b8b 100644
--- a/test/apiv2/20-containers.at
+++ b/test/apiv2/20-containers.at
@@ -547,6 +547,21 @@ t GET libpod/containers/$cname/json 200 \
.ImageName=$IMAGE \
.Name=$cname
+if root; then
+ podman run -dt --name=updateCtr alpine
+ echo '{"Memory":{"Limit":500000}, "CPU":{"Shares":123}}' >${TMPD}/update.json
+ t POST libpod/containers/updateCtr/update ${TMPD}/update.json 201
+
+ # Verify
+ echo '{ "AttachStdout":true,"Cmd":["cat","/sys/fs/cgroup/cpu.weight"]}' >${TMPD}/exec.json
+ t POST containers/updateCtr/exec ${TMPD}/exec.json 201 .Id~[0-9a-f]\\{64\\}
+ eid=$(jq -r '.Id' <<<"$output")
+ # 002 is the byte length
+ t POST exec/$eid/start 200 $'\001\0025'
+
+ podman rm -f updateCtr
+fi
+
rm -rf $TMPD
podman container rm -fa