summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/kpod_run.bats20
1 files changed, 20 insertions, 0 deletions
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 ]
+
+}