From ad255533d415393ebd119645af5c8b5a6637255f Mon Sep 17 00:00:00 2001 From: umohnani8 Date: Mon, 27 Nov 2017 13:17:42 -0500 Subject: Fix --volume flag for kpod create and run Enable the --volume flag to validate user input and add functionality for :z and :Z options Signed-off-by: umohnani8 Closes: #84 Approved by: mheon --- test/kpod_run.bats | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'test') diff --git a/test/kpod_run.bats b/test/kpod_run.bats index 626a838b9..5f5377a5e 100644 --- a/test/kpod_run.bats +++ b/test/kpod_run.bats @@ -120,3 +120,18 @@ IMAGE="docker.io/library/fedora:latest" [ "$output" = 100 ] } + +@test "kpod run with volume flag" { + run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run -v ${MOUNT_PATH}:/run/test ${FEDORA_MINIMAL} cat /proc/self/mountinfo | grep '${MOUNT_PATH} /run/test rw,relatime'" + echo $output + [ "$status" -eq 0 ] + run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run -v ${MOUNT_PATH}:/run/test:ro ${FEDORA_MINIMAL} cat /proc/self/mountinfo | grep '${MOUNT_PATH} /run/test ro,relatime'" + echo $output + [ "$status" -eq 0 ] + #run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run -v ${MOUNT_PATH}:/run/test:shared ${FEDORA_MINIMAL} cat /proc/self/mountinfo | grep '${MOUNT_PATH} /run/test rw,relatime shared:'" + #echo $output + #[ "$status" -eq 0 ] + #run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run -v ${MOUNT_PATH}:/run/test:rslave ${FEDORA_MINIMAL} cat /proc/self/mountinfo | grep '${MOUNT_PATH} /run/test rw,relatime master:'" + #echo $output + #[ "$status" -eq 0 ] +} -- cgit v1.2.3-54-g00ecf