Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions libbeat/scripts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ unit: ## @testing Runs the unit tests without coverage reports.
integration-tests: ## @testing Run integration tests. Unit tests are run as part of the integration tests.
integration-tests: prepare-tests mage
rm -f docker-compose.yml.lock
mage goIntegTest
$(COVERAGE_TOOL) -tags=integration $(RACE) -coverprofile=${COVERAGE_DIR}/integration.cov ${GOPACKAGES}

.PHONY: integration-tests-environment
integration-tests-environment: ## @testing Runs the integration inside a virtual environment. This can be run on any docker-machine (local, remote)
Expand All @@ -207,7 +207,12 @@ integration-tests-environment: prepare-tests build-image
#
# This will make docker-compose command to display the logs on stdout on error, It's not enabled
# by default because it can create noise if the test inside the container fails.
${DOCKER_COMPOSE} run beat make integration-tests RACE_DETECTOR=$(RACE_DETECTOR) DOCKER_COMPOSE_PROJECT_NAME=${DOCKER_COMPOSE_PROJECT_NAME}
${DOCKER_COMPOSE} run \
-e RACE_DETECTOR=$(RACE_DETECTOR) \
-e DOCKER_COMPOSE_PROJECT_NAME=${DOCKER_COMPOSE_PROJECT_NAME} \
-e TEST_ENVIRONMENT=${TEST_ENVIRONMENT} \
-e BEATS_DOCKER_INTEGRATION_TEST_ENV=${BEATS_DOCKER_INTEGRATION_TEST_ENV} \
beat make integration-tests

# Runs the system tests
.PHONY: system-tests
Expand Down
7 changes: 7 additions & 0 deletions metricbeat/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ BEAT_NAME?=metricbeat
BEAT_TITLE?=Metricbeat
SYSTEM_TESTS?=true
TEST_ENVIRONMENT?=true
BEATS_DOCKER_INTEGRATION_TEST_ENV?=true
ES_BEATS?=..

# Metricbeat can only be cross-compiled on platforms not requiring CGO.
Expand Down Expand Up @@ -76,3 +77,9 @@ assets:
go run ${ES_BEATS}/metricbeat/scripts/assets/assets.go ${ES_BEATS}/metricbeat/module
mkdir -p include/fields
go run ${ES_BEATS}/libbeat/scripts/cmd/global_fields/main.go -es_beats_path ${ES_BEATS} -beat_path ${PWD} | go run ${ES_BEATS}/dev-tools/cmd/asset/asset.go -license ${LICENSE} -out ./include/fields/fields.go -pkg include -priority asset.LibbeatFieldsPri ${ES_BEATS}/libbeat/fields.yml $(BEAT_NAME)

.PHONY: integration-tests
integration-tests: ## @testing Run golang integration tests.
integration-tests: prepare-tests mage
rm -f docker-compose.yml.lock
mage goIntegTest
3 changes: 2 additions & 1 deletion metricbeat/module/windows/perfmon/perfmon_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
// specific language governing permissions and limitations
// under the License.

// +build integration windows
// +build integration
// +build windows
Copy link
Copy Markdown
Contributor Author

@ycombinator ycombinator Jan 24, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without this change this integration test was being run on Linux. Multiple build tags on the same line are combined with a logical OR whereas multiple build tags on different lines are combined with an "AND". We want the latter effect for this test.


package perfmon

Expand Down