Files
weave/test/650_proxy_env_test.sh
T
Marc CARRE 43249a8d39 Change all launch-*/stop-* commands to launch/stop.
Given `proxy` & `router` processes have been merged, `launch-proxy`,
`launch-router`, `stop-proxy`, `stop-router` do not make sense any more, and
should just be `launch` and `stop` with the appropriate flags.
2017-05-10 10:25:36 +00:00

38 lines
1.1 KiB
Bash
Executable File

#! /bin/bash
. "$(dirname "$0")/config.sh"
CMD="run -e WEAVE_CIDR=10.2.1.4/24 $SMALL_IMAGE $CHECK_ETHWE_UP"
check() {
assert_raises "eval '$(weave_on $HOST1 env)' ; docker $CMD"
assert_raises "docker $(weave_on $HOST1 config) $CMD"
}
start_suite "Configure the docker daemon for the proxy"
# No output when nothing running
assert "weave_on $HOST1 env" ""
assert "weave_on $HOST1 config" ""
weave_on $HOST1 launch
check
# Check we can use the weave script through the proxy
assert_raises "eval '$(weave_on $HOST1 env)' ; $WEAVE version"
assert_raises "eval '$(weave_on $HOST1 env)' ; $WEAVE ps"
assert_raises "eval '$(weave_on $HOST1 env)' ; $WEAVE launch"
# Check we can use weave env/config with multiple -Hs specified
weave_on $HOST1 stop
weave_on $HOST1 launch -H tcp://0.0.0.0:12375 -H unix:///var/run/weave/weave.sock
check
# Check we can use weave env/config with unix -Hs specified
weave_on $HOST1 stop
weave_on $HOST1 launch -H unix:///var/run/weave/weave.sock
assert_raises "run_on $HOST1 'eval \$(weave env) ; docker $CMD'"
assert_raises "run_on $HOST1 'docker \$(weave config) $CMD'"
end_suite