Skip to content

Commit

Permalink
Stop environment (#4283)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
ruflin authored and tsg committed May 10, 2017
1 parent ba05315 commit 8662241
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libbeat/scripts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 8662241

Please sign in to comment.