mirror of
https://github.com/weaveworks/scope.git
synced 2026-05-02 15:28:16 +00:00
integration: restart docker daemon after each test (#2298)
To be sure that containers from previous tests are not running in the next test.
This commit is contained in:
committed by
Alfonso Acosta
parent
29b521b686
commit
32550f60f2
@@ -31,7 +31,12 @@ weave_on() {
|
||||
scope_end_suite() {
|
||||
end_suite
|
||||
for host in $HOSTS; do
|
||||
docker_on "$host" rm -f "$(docker_on "$host" ps -a -q)" 2>/dev/null 1>&2 || true
|
||||
docker_on "$host" rm -f "$(docker_on "$host" ps -a -q)" || true
|
||||
# Unfortunately, "docker rm" might not work: the CircleCI's Docker
|
||||
# client is unable to delete containers on GCE's Docker server. As a
|
||||
# workaround, restart the Docker daemon: at least the containers from
|
||||
# previous tests will not be running.
|
||||
run_on "$host" "sudo service docker restart"
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user