Remove tests of situations that don't exist any more and fix the following tests: - Fix test 660: pass arguments in correct order. - Fix test 620: no double launch, weave stop instead of kill -9. - Now that router and proxy have been merged, we should only call `weave launch` once. - `sudo kill -9` was introduced because we previously had `docker kill` (see: http://github.com/weaveworks/weave/commit/cb73b738621d57727072ae998cdeaec337f23a1a), because we had no `weave stop-proxy` yet (see: http://github.com/weaveworks/weave/commit/e31f21a6d224d61de1d8a940ea4b0b45cebc9723). Pre-proxy-merge, this should just have been `weave stop-proxy`, and now that router and proxy have been merged, we should just call `weave stop`. - Fix test 650: no double launch. - Fix test 630: remove redundant case & assertions. - Fix test 090: remove irrelevant assertions. PING
37 lines
1.0 KiB
Bash
Executable File
37 lines
1.0 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"
|
|
|
|
# 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
|