diff --git a/test/310_docker_restart_test.sh b/test/310_docker_restart_test.sh index 5abfd774..24730696 100755 --- a/test/310_docker_restart_test.sh +++ b/test/310_docker_restart_test.sh @@ -8,18 +8,6 @@ check_attached() { done } -wait_for_proxy() { - for i in $(seq 1 120); do - echo "Waiting for proxy to start" - if proxy docker_on $1 info > /dev/null 2>&1 ; then - return - fi - sleep 1 - done - echo "Timed out waiting for proxy to start" >&2 - exit 1 -} - start_suite "Containers get same IP address on restart" weave_on $HOST1 launch-router diff --git a/test/640_proxy_restart_reattaches_test.sh b/test/640_proxy_restart_reattaches_test.sh index 4ea8e04b..17dbbc86 100755 --- a/test/640_proxy_restart_reattaches_test.sh +++ b/test/640_proxy_restart_reattaches_test.sh @@ -9,18 +9,6 @@ check_attached() { assert_dns_record $HOST1 c1 $NAME $C2 } -wait_for_proxy() { - for i in $(seq 1 120); do - echo "Waiting for proxy to start" - if proxy docker_on $1 info > /dev/null 2>&1 ; then - return - fi - sleep 1 - done - echo "Timed out waiting for proxy to start" >&2 - exit 1 -} - N=50 # Create and remove a lot of containers in a small subnet; the failure # mode is that this takes a long time as it has to wait for the old diff --git a/test/config.sh b/test/config.sh index 02ba5630..599194bb 100644 --- a/test/config.sh +++ b/test/config.sh @@ -171,6 +171,18 @@ proxy_start_container_with_dns() { proxy docker_on $host run "$@" -dt $DNS_IMAGE /bin/sh } +wait_for_proxy() { + for i in $(seq 1 120); do + echo "Waiting for proxy to start" + if proxy docker_on $1 info > /dev/null 2>&1 ; then + return + fi + sleep 1 + done + echo "Timed out waiting for proxy to start" >&2 + exit 1 +} + rm_containers() { host=$1 shift