Files
weave/test/090_docker_restart_policy_2_test.sh
T
Martynas Pumputis 1f42a9d2f9 Merge plugin into weaver
This simplifies the following:

- plugin-v2 does not need to start "plugin" as a separate process, thus
  Docker is able to properly restart plugin-v2 in a case of any child
  process failing.
- No need for weaveplugin container.

plugin is enabled by default when running "weave launch". when starting
only the router, you should pass "--plugin" parameter to enable it.

The env var WEAVE_NO_PLUGIN is no more.
2017-04-12 13:05:40 +00:00

29 lines
833 B
Bash
Executable File

#! /bin/bash
. "$(dirname "$0")/config.sh"
start_suite "Test docker restart policy"
weave_on $HOST1 launch
assert "docker_on $HOST1 inspect -f '{{.HostConfig.RestartPolicy.Name}}' weave weaveproxy" "always\nalways"
assert_raises "check_restart $HOST1 weave"
assert_raises "check_restart $HOST1 weaveproxy"
# stop + launch tests that restart policy changes result
# in the old containers being removed and new ones created
weave_on $HOST1 stop
weave_on $HOST1 launch --no-restart
assert "docker_on $HOST1 inspect -f '{{.HostConfig.RestartPolicy.Name}}' weave weaveproxy" "no\nno"
assert_raises "! check_restart $HOST1 weave"
assert_raises "! check_restart $HOST1 weaveproxy"
# Relaunch to prevent the `weave stop` in `end_suite`
# timing out trying to remove the plugin network
weave_on $HOST1 launch --no-restart
end_suite