Skip to content

Commit a21ffb0

Browse files
authored
Merge pull request #12469 from arshadd-b/test-framework
🌱 Add test/framework/* tests in CI
2 parents e1b4e4f + b4b647e commit a21ffb0

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -982,6 +982,12 @@ test-test-extension-junit: $(SETUP_ENVTEST) $(GOTESTSUM) ## Run unit and integra
982982
$(GOTESTSUM) --junitfile $(ARTIFACTS)/junit.test_extension.xml --raw-command cat $(ARTIFACTS)/junit.test_extension.stdout
983983
exit $$(cat $(ARTIFACTS)/junit.test_extension.exitcode)
984984

985+
.PHONY: test-framework-junit
986+
test-framework-junit: $(SETUP_ENVTEST) $(GOTESTSUM) ## Run unit and integration tests and generate a junit report for the test extension
987+
cd $(E2E_FRAMEWORK_DIR); set +o errexit; (KUBEBUILDER_ASSETS="$(KUBEBUILDER_ASSETS)" go test -race -json ./... $(TEST_ARGS); echo $$? > $(ARTIFACTS)/junit.test_framework.exitcode) | tee $(ARTIFACTS)/junit.test_framework.stdout
988+
$(GOTESTSUM) --junitfile $(ARTIFACTS)/junit.test_framework.xml --raw-command cat $(ARTIFACTS)/junit.test_framework.stdout
989+
exit $$(cat $(ARTIFACTS)/junit.test_framework.exitcode)
990+
985991
.PHONY: test-e2e
986992
test-e2e: $(GINKGO) generate-e2e-templates ## Run the end-to-end tests
987993
$(GINKGO) -v --trace --tags=e2e \

scripts/ci-test.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,7 @@ make test-docker-infrastructure-junit
3434
echo -e "\n*** Testing Cluster API Runtime SDK test extension ***\n"
3535
# Test Extension
3636
make test-test-extension-junit
37+
38+
echo -e "\n*** Testing Cluster API testing framework ***\n"
39+
# Test Framework
40+
make test-framework-junit

0 commit comments

Comments
 (0)