summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2017-11-03 19:44:23 +0000
committerDaniel J Walsh <dwalsh@redhat.com>2017-11-04 09:07:47 +0000
commit619637a9197877f3bda54648f9fabc4af90cf9c2 (patch)
tree87c2b0e722100c8068333b686b3636d046bd5dfa /test
parent098389dc3e7bbba7c266ad24c909f3a5422e2908 (diff)
downloadpodman-619637a9197877f3bda54648f9fabc4af90cf9c2.tar.gz
podman-619637a9197877f3bda54648f9fabc4af90cf9c2.tar.bz2
podman-619637a9197877f3bda54648f9fabc4af90cf9c2.zip
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 <dwalsh@redhat.com>
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 ]
+
+}