Avoid breakage from IFS being reset in "run"
See https://github.com/sstephenson/bats/issues/89
This commit is contained in:
parent
0d2bc38179
commit
b1a08843da
1 changed files with 2 additions and 0 deletions
|
@ -87,6 +87,7 @@ function prepare_web_container {
|
||||||
local -r options="$@"
|
local -r options="$@"
|
||||||
|
|
||||||
local expose_option=""
|
local expose_option=""
|
||||||
|
IFS=$' \t\n' # See https://github.com/sstephenson/bats/issues/89
|
||||||
for port in $ports; do
|
for port in $ports; do
|
||||||
expose_option="${expose_option}--expose=$port "
|
expose_option="${expose_option}--expose=$port "
|
||||||
done
|
done
|
||||||
|
@ -121,6 +122,7 @@ function prepare_web_container {
|
||||||
assert_success
|
assert_success
|
||||||
|
|
||||||
# THEN querying directly port works
|
# THEN querying directly port works
|
||||||
|
IFS=$' \t\n' # See https://github.com/sstephenson/bats/issues/89
|
||||||
for port in $ports; do
|
for port in $ports; do
|
||||||
run retry 5 1s docker run --rm appropriate/curl --silent --fail http://$(docker_ip $container_name):$port/data
|
run retry 5 1s docker run --rm appropriate/curl --silent --fail http://$(docker_ip $container_name):$port/data
|
||||||
assert_output "answer from port $port"
|
assert_output "answer from port $port"
|
||||||
|
|
Reference in a new issue