From 4a68a5303c74298f50c4a2d51e75527d439f09f1 Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Tue, 28 Nov 2017 22:17:13 -0500 Subject: Attempt fix for persistent bash parameter expansion issues Signed-off-by: Matthew Heon Closes: #68 Approved by: rhatdan --- test/kpod_run.bats | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'test/kpod_run.bats') diff --git a/test/kpod_run.bats b/test/kpod_run.bats index 65f3e9df4..626a838b9 100644 --- a/test/kpod_run.bats +++ b/test/kpod_run.bats @@ -11,13 +11,13 @@ function setup() { } @test "run a container based on local image" { - run ${KPOD_BINARY} ${KPOD_OPTIONS} run $BB ls + run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run $BB ls" echo "$output" [ "$status" -eq 0 ] } @test "run a container based on a remote image" { - run ${KPOD_BINARY} ${KPOD_OPTIONS} run ${BB_GLIBC} ls + run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run ${BB_GLIBC} ls" echo "$output" [ "$status" -eq 0 ] } @@ -27,11 +27,11 @@ function setup() { skip "SELinux not enabled" fi - run ${KPOD_BINARY} ${KPOD_OPTIONS} run ${ALPINE} cat /proc/self/attr/current + run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run ${ALPINE} cat /proc/self/attr/current" echo "$output" firstLabel=$output - run ${KPOD_BINARY} ${KPOD_OPTIONS} run ${ALPINE} cat /proc/self/attr/current + run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run ${ALPINE} cat /proc/self/attr/current" echo "$output" [ "$output" != "${firstLabel}" ] } @@ -46,19 +46,19 @@ function setup() { } @test "run capabilities test" { - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} run --cap-add all ${ALPINE} cat /proc/self/status + run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run --cap-add all ${ALPINE} cat /proc/self/status" echo "$output" [ "$status" -eq 0 ] - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} run --cap-add sys_admin ${ALPINE} cat /proc/self/status + run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run --cap-add sys_admin ${ALPINE} cat /proc/self/status" echo "$output" [ "$status" -eq 0 ] - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} run --cap-drop all ${ALPINE} cat /proc/self/status + run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run --cap-drop all ${ALPINE} cat /proc/self/status" echo "$output" [ "$status" -eq 0 ] - run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} run --cap-drop setuid ${ALPINE} cat /proc/self/status + run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run --cap-drop setuid ${ALPINE} cat /proc/self/status" echo "$output" [ "$status" -eq 0 ] @@ -83,7 +83,7 @@ function setup() { [ "$status" -eq 0 ] [ "$output" = "BAR" ] - run ${KPOD_BINARY} ${KPOD_OPTIONS} run -env FOO ${ALPINE} printenv + run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run -env FOO ${ALPINE} printenv" echo "$output" [ "$status" -ne 0 ] @@ -99,9 +99,9 @@ IMAGE="docker.io/library/fedora:latest" @test "run limits test" { - ${KPOD_BINARY} ${KPOD_OPTIONS} pull ${IMAGE} + run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} pull ${IMAGE}" - run ${KPOD_BINARY} ${KPOD_OPTIONS} run --ulimit rtprio=99 --cap-add=sys_nice ${IMAGE} cat /proc/self/sched + run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} run --ulimit rtprio=99 --cap-add=sys_nice ${IMAGE} cat /proc/self/sched" echo $output [ "$status" -eq 0 ] -- cgit v1.2.3-54-g00ecf