From 619637a9197877f3bda54648f9fabc4af90cf9c2 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Fri, 3 Nov 2017 19:44:23 +0000 Subject: Handle Linux Capabilities from command line Had to revendor in docker/docker again, which dropped a bunch of packages Signed-off-by: Daniel J Walsh --- test/kpod_run.bats | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'test') diff --git a/test/kpod_run.bats b/test/kpod_run.bats index d0cac96de..20b3a2dfe 100644 --- a/test/kpod_run.bats +++ b/test/kpod_run.bats @@ -36,3 +36,23 @@ ALPINE="docker.io/library/alpine:latest" [ "$status" -eq 0 ] } + +@test "run selinux test" { + + run ${KPOD_BINARY} ${KPOD_OPTIONS} run --cap-add all ${ALPINE} cat /proc/self/status + echo "$output" + [ "$status" -eq 0 ] + + run ${KPOD_BINARY} ${KPOD_OPTIONS} run --cap-add sys_admin ${ALPINE} cat /proc/self/status + echo "$output" + [ "$status" -eq 0 ] + + run ${KPOD_BINARY} ${KPOD_OPTIONS} run --cap-drop all ${ALPINE} cat /proc/self/status + echo "$output" + [ "$status" -eq 0 ] + + run ${KPOD_BINARY} ${KPOD_OPTIONS} run --cap-drop setuid ${ALPINE} cat /proc/self/status + echo "$output" + [ "$status" -eq 0 ] + +} -- cgit v1.2.3-54-g00ecf