From 5d52f74d2136786c2874898ad373808e25609545 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Mon, 20 Nov 2017 12:50:55 -0500 Subject: Add support for Ulimits/Rlimits to kpod create/run Signed-off-by: Daniel J Walsh Closes: #24 Approved by: mheon --- test/kpod_run.bats | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'test') diff --git a/test/kpod_run.bats b/test/kpod_run.bats index bcc1d816d..203fcc0cc 100644 --- a/test/kpod_run.bats +++ b/test/kpod_run.bats @@ -90,3 +90,20 @@ function setup() { # echo "$output" # [ "$status" -eq 0 ] } + +IMAGE="docker.io/library/fedora:latest" + +@test "run limits test" { + + ${KPOD_BINARY} ${KPOD_OPTIONS} pull ${IMAGE} + + run ${KPOD_BINARY} ${KPOD_OPTIONS} run --ulimit rtprio=99 --cap-add=sys_nice ${IMAGE} cat /proc/self/sched + echo $output + [ "$status" -eq 0 ] + + run bash -c "export FOO=BAR; ${KPOD_BINARY} ${KPOD_OPTIONS} run --ulimit nofile=2048:2048 ${IMAGE} ulimit -n | tr -d '\r'" + echo $output + [ "$status" -eq 0 ] + [ "$output" = 2048 ] + +} -- cgit v1.2.3-54-g00ecf