Skip to content

Commit 8559ce0

Browse files
authored
Merge pull request #39 from warhodes-dev/fix-api_test.py
Update configuration for examples/api_test.py
2 parents 672060b + fd8f7d1 commit 8559ce0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

examples/api_test.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
print("Creating rootfs using 'download', arch=%s" % arch)
6767
container.create("download", 0,
6868
{"dist": "ubuntu",
69-
"release": "xenial",
69+
"release": "noble",
7070
"arch": arch})
7171

7272
assert(container.defined)
@@ -141,10 +141,10 @@
141141

142142
## Testing cgroups a bit
143143
print("Testing cgroup API")
144-
max_mem = container.get_cgroup_item("memory.max_usage_in_bytes")
145-
current_limit = container.get_cgroup_item("memory.limit_in_bytes")
146-
assert(container.set_cgroup_item("memory.limit_in_bytes", max_mem))
147-
assert(container.get_cgroup_item("memory.limit_in_bytes") != current_limit)
144+
max_mem = container.get_cgroup_item("memory.peak")
145+
current_limit = container.get_cgroup_item("memory.max")
146+
assert(container.set_cgroup_item("memory.max", max_mem))
147+
assert(container.get_cgroup_item("memory.max") != current_limit)
148148

149149
## Freezing the container
150150
print("Freezing the container")

0 commit comments

Comments
 (0)