summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2017-11-28 22:17:13 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2017-11-29 12:15:16 +0000
commit4a68a5303c74298f50c4a2d51e75527d439f09f1 (patch)
treeda027451d9d2532b682e1ddaabc5801911d0a0e8 /test
parent3180e387955c7777ab15ed2dfe7e587b54e8c308 (diff)
downloadpodman-4a68a5303c74298f50c4a2d51e75527d439f09f1.tar.gz
podman-4a68a5303c74298f50c4a2d51e75527d439f09f1.tar.bz2
podman-4a68a5303c74298f50c4a2d51e75527d439f09f1.zip
Attempt fix for persistent bash parameter expansion issues
Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #68 Approved by: rhatdan
Diffstat (limited to 'test')
-rw-r--r--test/helpers.bash1
-rw-r--r--test/kpod_run.bats22
-rw-r--r--test/kpod_save.bats11
-rw-r--r--test/kpod_tag.bats24
-rw-r--r--test/kpod_version.bats2
5 files changed, 30 insertions, 30 deletions
diff --git a/test/helpers.bash b/test/helpers.bash
index d9616ad45..2117716ec 100644
--- a/test/helpers.bash
+++ b/test/helpers.bash
@@ -162,6 +162,7 @@ function wait_until_reachable() {
function cleanup_test() {
run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} rm --force --all"
+ echo "$output"
rm -rf "$TESTDIR"
}
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 ]
diff --git a/test/kpod_save.bats b/test/kpod_save.bats
index ecbcd1faf..6da3279a2 100644
--- a/test/kpod_save.bats
+++ b/test/kpod_save.bats
@@ -11,35 +11,34 @@ function setup() {
}
@test "kpod save output flag" {
- run ${KPOD_BINARY} ${KPOD_OPTIONS} save -o alpine.tar $ALPINE
+ run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} save -o alpine.tar $ALPINE"
echo "$output"
[ "$status" -eq 0 ]
rm -f alpine.tar
}
@test "kpod save oci flag" {
- run ${KPOD_BINARY} ${KPOD_OPTIONS} save -o alpine.tar --format oci-archive $ALPINE
+ run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} save -o alpine.tar --format oci-archive $ALPINE"
echo "$output"
[ "$status" -eq 0 ]
rm -f alpine.tar
}
@test "kpod save using stdout" {
- run ${KPOD_BINARY} ${KPOD_OPTIONS} save > alpine.tar $ALPINE
- echo "$output"
+ run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} save $ALPINE > alpine.tar"
[ "$status" -eq 0 ]
rm -f alpine.tar
}
@test "kpod save quiet flag" {
- run ${KPOD_BINARY} ${KPOD_OPTIONS} save -q -o alpine.tar $ALPINE
+ run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} save -q -o alpine.tar $ALPINE"
echo "$output"
[ "$status" -eq 0 ]
rm -f alpine.tar
}
@test "kpod save non-existent image" {
- run ${KPOD_BINARY} ${KPOD_OPTIONS} save -o alpine.tar FOOBAR
+ run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} save -o alpine.tar FOOBAR"
echo "$output"
[ "$status" -ne 0 ]
}
diff --git a/test/kpod_tag.bats b/test/kpod_tag.bats
index d2de6b075..ce3d19140 100644
--- a/test/kpod_tag.bats
+++ b/test/kpod_tag.bats
@@ -9,42 +9,42 @@ function teardown() {
}
@test "kpod tag with shortname:latest" {
- run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} pull $IMAGE
+ run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} pull $IMAGE"
echo "$output"
[ "$status" -eq 0 ]
- run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} tag $IMAGE foobar:latest
+ run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} tag $IMAGE foobar:latest"
[ "$status" -eq 0 ]
- run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} inspect foobar:latest
+ run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} inspect foobar:latest"
echo "$output"
[ "$status" -eq 0 ]
- run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} rmi --force foobar:latest
+ run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} rmi --force foobar:latest"
[ "$status" -eq 0 ]
}
@test "kpod tag with shortname" {
- run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} pull $IMAGE
+ run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} pull $IMAGE"
echo "$output"
[ "$status" -eq 0 ]
- run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} tag $IMAGE foobar
+ run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} tag $IMAGE foobar"
echo "$output"
[ "$status" -eq 0 ]
- run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} inspect foobar:latest
+ run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} inspect foobar:latest"
echo "$output"
[ "$status" -eq 0 ]
- run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} rmi --force foobar:latest
+ run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} rmi --force foobar:latest"
[ "$status" -eq 0 ]
}
@test "kpod tag with shortname:tag" {
- run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} pull $IMAGE
+ run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} pull $IMAGE"
echo "$output"
[ "$status" -eq 0 ]
- run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} tag $IMAGE foobar:v
+ run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} tag $IMAGE foobar:v"
echo "$output"
[ "$status" -eq 0 ]
- run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} inspect foobar:v
+ run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} inspect foobar:v"
echo "$output"
[ "$status" -eq 0 ]
- run bash -c ${KPOD_BINARY} ${KPOD_OPTIONS} rmi --force foobar:v
+ run bash -c "${KPOD_BINARY} ${KPOD_OPTIONS} rmi --force foobar:v"
[ "$status" -eq 0 ]
}
diff --git a/test/kpod_version.bats b/test/kpod_version.bats
index 41f356de7..b0e7a3d13 100644
--- a/test/kpod_version.bats
+++ b/test/kpod_version.bats
@@ -7,7 +7,7 @@ function teardown() {
}
@test "kpod version test" {
- run bash -c ${KPOD_BINARY} version
+ run bash -c "${KPOD_BINARY} version"
echo "$output"
[ "$status" -eq 0 ]
}