From 84b34e1d8d1b4989ddf11d23695ae3870089cad1 Mon Sep 17 00:00:00 2001 From: Michael Nairn Date: Tue, 15 Oct 2024 18:40:55 +0100 Subject: [PATCH] tests: Allow overriding packages for integration test 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 --- make/integration-tests.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/make/integration-tests.mk b/make/integration-tests.mk index c28050d12..a217ed7db 100644 --- a/make/integration-tests.mk +++ b/make/integration-tests.mk @@ -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 @@ -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)