diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-09-01 20:48:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-01 20:48:25 +0200 |
commit | d0d1af338a500f2ad00d5ce0638901465602817d (patch) | |
tree | 327a081bd2243ffcbdf786a940b1dc82d041bea5 /test/apiv2 | |
parent | 0085fbb488eec30e71e6cced6a06dbdb134e32a6 (diff) | |
parent | 050f3291b9ef8788510b78c543055638275eb20f (diff) | |
download | podman-d0d1af338a500f2ad00d5ce0638901465602817d.tar.gz podman-d0d1af338a500f2ad00d5ce0638901465602817d.tar.bz2 podman-d0d1af338a500f2ad00d5ce0638901465602817d.zip |
Merge pull request #15276 from cdoern/update
implement podman update
Diffstat (limited to 'test/apiv2')
-rw-r--r-- | test/apiv2/20-containers.at | 15 | ||||
-rw-r--r-- | test/apiv2/python/rest_api/test_v2_0_0_container.py | 2 |
2 files changed, 15 insertions, 2 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 diff --git a/test/apiv2/python/rest_api/test_v2_0_0_container.py b/test/apiv2/python/rest_api/test_v2_0_0_container.py index a6cd93a1a..25596a9b7 100644 --- a/test/apiv2/python/rest_api/test_v2_0_0_container.py +++ b/test/apiv2/python/rest_api/test_v2_0_0_container.py @@ -359,8 +359,6 @@ class ContainerTestCase(APITestCase): self.assertEqual(2000, out["HostConfig"]["MemorySwap"]) self.assertEqual(1000, out["HostConfig"]["Memory"]) - - def execute_process(cmd): return subprocess.run( cmd, |