It's ugly, but beats arg-parsing, inspecting the container and piecing the address together from exposed ports. We could just use the host from DOCKER_HOST, but that will fail in the case of a host with multiple IPs, where the proxy only listens on one.
14 lines
317 B
Bash
14 lines
317 B
Bash
#! /bin/bash
|
|
|
|
. ./config.sh
|
|
|
|
start_suite "Configure the docker daemon for the proxy"
|
|
|
|
weave_on $HOST1 launch-proxy
|
|
|
|
CMD="run -e WEAVE_CIDR=10.2.1.4/24 $BASE_IMAGE $CHECK_ETHWE_UP"
|
|
assert_raises "eval '$(weave_on $HOST1 proxy-env)' ; docker $CMD"
|
|
assert_raises "docker $(weave_on $HOST1 proxy-config) $CMD"
|
|
|
|
end_suite
|