3
0
mirror of https://github.com/larvit/adf-codec.git synced 2026-11-20 15:15:44 +01:00

Give every gate and publish container a memory limit and an equal swap limit

This commit is contained in:
2026-11-09 08:56:49 +01:00
committed by Lillem4n
parent 2bf8e37283
commit 384b118f3a
5 changed files with 30 additions and 11 deletions
+7
View File
@@ -62,6 +62,13 @@ interrupt_stops_container() {
leg "Ctrl-C stops an in_image container ($node_image)" interrupt_stops_container
# memory.swap.max is 0 when --memory-swap equals --memory.
container_is_limited() {
[ "$(in_image "$node_image" sh -c 'cat /sys/fs/cgroup/memory.max /sys/fs/cgroup/memory.swap.max' | tr '\n' ' ')" = '8589934592 0 ' ]
}
leg "an in_image container has equal memory and swap limits ($node_image)" container_is_limited
test_log=$(mktemp)
node_tests() {
in_image "$node_image" npm test 2>&1 | tee "$test_log"