From adf8809521733283c364ec7de27c783e324185e8 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Thu, 30 Nov 2017 09:37:57 -0500 Subject: Add NetMode, UTSMode and IPCMode Allow kpod create/run to create contianers in different network namespaces, uts namespaces and IPC Namespaces. This patch just handles the simple join the host, or another containers namespaces. Lots more work needed to full integrate --net Signed-off-by: Daniel J Walsh Closes: #64 Approved by: mheon --- test/kpod_run_ns.bats | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'test/kpod_run_ns.bats') diff --git a/test/kpod_run_ns.bats b/test/kpod_run_ns.bats index 233f8158b..c1b269587 100644 --- a/test/kpod_run_ns.bats +++ b/test/kpod_run_ns.bats @@ -30,3 +30,21 @@ function setup() { echo $output [ "$status" -ne 0 ] } + +@test "run ipcns test" { + + ${KPOD_BINARY} ${KPOD_OPTIONS} pull ${ALPINE} + + tmp=$(mktemp /dev/shm/foo.XXXXX) + run ${KPOD_BINARY} ${KPOD_OPTIONS} run --ipc=host ${ALPINE} ls $tmp + echo $output + out=$(echo $output | tr -d '\r') + [ "$status" -eq 0 ] + [ $out != $tmp ] + + rm -f $tmp + + run ${KPOD_BINARY} ${KPOD_OPTIONS} run --ipc=badpid ${ALPINE} sh -c 'echo $$' + echo $output + [ "$status" -ne 0 ] +} -- cgit v1.2.3-54-g00ecf