Skip to content

Commit 1867f87

Browse files
committed
Run CAPD conversion tests in CI
Signed-off-by: Stefan Büringer [email protected]
1 parent 4e37a51 commit 1867f87

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

Makefile

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,10 @@ test-cover: ## Run unit and integration tests and generate a coverage report
950950
go tool cover -html=out/coverage.out -o out/coverage.html
951951

952952
.PHONY: test-docker-infrastructure
953-
test-docker-infrastructure: $(SETUP_ENVTEST) ## Run unit and integration tests for docker infrastructure provider
953+
test-docker-infrastructure: $(SETUP_ENVTEST) ## Run unit and integration tests with race detector for docker infrastructure provider
954+
# Note: Fuzz tests are not executed with race detector because they would just time out.
955+
# To achieve that, all files with fuzz tests have the "!race" build tag, to still run fuzz tests
956+
# we have an additional `go test` run that focuses on "TestFuzzyConversion".
954957
cd $(CAPD_DIR); KUBEBUILDER_ASSETS="$(KUBEBUILDER_ASSETS)" go test -race ./... $(TEST_ARGS)
955958
$(MAKE) test-docker-infrastructure-conversions TEST_ARGS="$(TEST_ARGS)"
956959

@@ -959,15 +962,17 @@ test-docker-infrastructure-conversions: $(SETUP_ENVTEST) ## Run conversions test
959962
cd $(CAPD_DIR); KUBEBUILDER_ASSETS="$(KUBEBUILDER_ASSETS)" go test -run "^TestFuzzyConversion$$" ./... $(TEST_ARGS)
960963

961964
.PHONY: test-docker-infrastructure-verbose
962-
test-docker-infrastructure-verbose: ## Run unit and integration tests for docker infrastructure provider with verbose flag
965+
test-docker-infrastructure-verbose: ## Run unit and integration tests with race detector and with verbose flag for docker infrastructure provider
963966
$(MAKE) test-docker-infrastructure TEST_ARGS="$(TEST_ARGS) -v"
964967

965968
.PHONY: test-docker-infrastructure-junit
966-
test-docker-infrastructure-junit: $(SETUP_ENVTEST) $(GOTESTSUM) ## Run unit and integration tests and generate a junit report for docker infrastructure provider
969+
test-docker-infrastructure-junit: $(SETUP_ENVTEST) $(GOTESTSUM) ## Run unit and integration tests with race detector and generate a junit report for docker infrastructure provider
967970
cd $(CAPD_DIR); set +o errexit; (KUBEBUILDER_ASSETS="$(KUBEBUILDER_ASSETS)" go test -race -json ./... $(TEST_ARGS); echo $$? > $(ARTIFACTS)/junit.infra_docker.exitcode) | tee $(ARTIFACTS)/junit.infra_docker.stdout
968971
$(GOTESTSUM) --junitfile $(ARTIFACTS)/junit.infra_docker.xml --raw-command cat $(ARTIFACTS)/junit.infra_docker.stdout
969972
exit $$(cat $(ARTIFACTS)/junit.infra_docker.exitcode)
970-
973+
cd $(CAPD_DIR); set +o errexit; (KUBEBUILDER_ASSETS="$(KUBEBUILDER_ASSETS)" go test -run "^TestFuzzyConversion$$" -json ./... $(TEST_ARGS); echo $$? > $(ARTIFACTS)/junit-fuzz.infra_docker.exitcode) | tee $(ARTIFACTS)/junit-fuzz.infra_docker.stdout
974+
$(GOTESTSUM) --junitfile $(ARTIFACTS)/junit-fuzz.infra_docker.xml --raw-command cat $(ARTIFACTS)/junit-fuzz.infra_docker.stdout
975+
exit $$(cat $(ARTIFACTS)/junit-fuzz.infra_docker.exitcode)
971976
.PHONY: test-test-extension
972977
test-test-extension: $(SETUP_ENVTEST) ## Run unit and integration tests for the test extension
973978
cd $(TEST_EXTENSION_DIR); KUBEBUILDER_ASSETS="$(KUBEBUILDER_ASSETS)" go test -race ./... $(TEST_ARGS)

0 commit comments

Comments
 (0)