Avoid breakage from IFS being reset in "run"

See https://github.com/sstephenson/bats/issues/89
This commit is contained in:
Mike Dillon 2015-10-11 10:55:17 -07:00
parent 0d2bc38179
commit b1a08843da

View file

@ -87,6 +87,7 @@ function prepare_web_container {
local -r options="$@"
local expose_option=""
IFS=$' \t\n' # See https://github.com/sstephenson/bats/issues/89
for port in $ports; do
expose_option="${expose_option}--expose=$port "
done
@ -121,6 +122,7 @@ function prepare_web_container {
assert_success
# THEN querying directly port works
IFS=$' \t\n' # See https://github.com/sstephenson/bats/issues/89
for port in $ports; do
run retry 5 1s docker run --rm appropriate/curl --silent --fail http://$(docker_ip $container_name):$port/data
assert_output "answer from port $port"