Skip to content

Commit

Permalink
tests: Allow overriding packages for integration test
Browse files Browse the repository at this point in the history
Adds a new variable `INTEGRATION_TEST_PACKAGES` which sets the packages
used by the `test-integration` make target allowing it to be more easily
modified for local development testing.

Example:
```
INTEGRATION_TEST_PACKAGES=tests/common/dnspolicy/... INTEGRATION_TESTS_EXTRA_ARGS='-v --repeat=4 --focus="valid target"' INTEGRATION_TEST_NUM_PROCESSES=4 INTEGRATION_TEST_NUM_CORES=2 make test-integration
```

Signed-off-by: Michael Nairn <[email protected]>
  • Loading branch information
mikenairn committed Oct 16, 2024
1 parent 54bf3b3 commit 84b34e1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion make/integration-tests.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ INTEGRATION_COVER_PKGS = ./pkg/...,./controllers/...,./api/...
INTEGRATION_TESTS_EXTRA_ARGS ?=
INTEGRATION_TEST_NUM_CORES ?= 4
INTEGRATION_TEST_NUM_PROCESSES ?= 10
INTEGRATION_TEST_PACKAGES ?= tests/common/...

##@ Integration tests

Expand Down Expand Up @@ -92,4 +93,4 @@ test-integration: clean-cov generate fmt vet ginkgo ## Requires kubernetes clust
--fail-on-pending \
--keep-going \
--trace \
$(INTEGRATION_TESTS_EXTRA_ARGS) tests/common/...
$(INTEGRATION_TESTS_EXTRA_ARGS) $(INTEGRATION_TEST_PACKAGES)

0 comments on commit 84b34e1

Please sign in to comment.