Remove newlines in test output
diff --git a/tests/tests.bats b/tests/tests.bats
index cddd57f..d3a69a2 100644
--- a/tests/tests.bats
+++ b/tests/tests.bats
@@ -17,17 +17,15 @@
@test "test multiple JENKINS_OPTS" {
# running --help --version should return the version, not the help
local version=$(grep 'ENV JENKINS_VERSION' Dockerfile | sed -e 's/.*:-\(.*\)}/\1/')
- # need the last line of output, removing the last char
- local actual_version=$(docker run --rm -ti -e JENKINS_OPTS="--help --version" --name $SUT_CONTAINER -P $SUT_IMAGE | tail -n 1)
- assert "${version}" echo "${actual_version::-1}"
+ # need the last line of output
+ assert "${version}" docker run --rm -ti -e JENKINS_OPTS="--help --version" --name $SUT_CONTAINER -P $SUT_IMAGE | tail -n 1
}
@test "test jenkins arguments" {
# running --help --version should return the version, not the help
local version=$(grep 'ENV JENKINS_VERSION' Dockerfile | sed -e 's/.*:-\(.*\)}/\1/')
- # need the last line of output, removing the last char
- local actual_version=$(docker run --rm -ti --name $SUT_CONTAINER -P $SUT_IMAGE --help --version | tail -n 1)
- assert "${version}" echo "${actual_version::-1}"
+ # need the last line of output
+ assert "${version}" docker run --rm -ti --name $SUT_CONTAINER -P $SUT_IMAGE --help --version | tail -n 1
}
@test "create test container" {