From 86622412f31ae2840d0647a9b3c9c2d3904c1c00 Mon Sep 17 00:00:00 2001 From: Nicolas Ruflin Date: Wed, 10 May 2017 17:33:27 +0200 Subject: [PATCH] Stop environment (#4283) * Use docker-compose down to remove networks Docker-compose creates a unique network for each build now. docker-compose rm -v -f did not remove the created networks. The command `docker-compose down` does also remove the networks. This is important as docker-compose has a default limit of 31 networks. * Stop environment is now call as part of the testsuite The testsuite command cleans up the environment after being finished. This reduces the number of containers run at the same time on the machine and saves resources. So far cleanup only happend after all testsuites for all beats were executed. The cleanup afterwards is still needed, as cleanup will not happen in case a test fails. --- libbeat/scripts/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libbeat/scripts/Makefile b/libbeat/scripts/Makefile index b1012d75197..8e9e3979b37 100755 --- a/libbeat/scripts/Makefile +++ b/libbeat/scripts/Makefile @@ -239,6 +239,10 @@ testsuite: clean update $(MAKE) benchmark-tests $(MAKE) coverage-report + if [ $(TEST_ENVIRONMENT) = true ]; then \ + $(MAKE) stop-environment; \ + fi + # Generates a coverage report from the existing coverage files .PHONY: coverage-report coverage-report: