diff --git a/Makefile b/Makefile index e892cda..1e5b134 100644 --- a/Makefile +++ b/Makefile @@ -13,11 +13,14 @@ MVN := mvn # --------------------------------------------------------------------------- # Targets # --------------------------------------------------------------------------- -.PHONY: help setup compile test package clean +# Integration test class patterns for -Dtest (simple class name globs, not ANT paths) +INTEGRATION_TESTS = Real*Test,AzureIntegrationTest,AzureOAuthTokenTest + +.PHONY: help setup compile test test-cloud test-all package clean help: ## Show this help message @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \ - awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-15s\033[0m %s\n", $$1, $$2}' + awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-20s\033[0m %s\n", $$1, $$2}' setup: ## Install/verify development dependencies (Java 11, Maven, Rust, protoc) ./scripts/setup.sh @@ -25,9 +28,15 @@ setup: ## Install/verify development dependencies (Java 11, Maven, Rust, protoc) compile: ## Compile sources (Java + Rust native via cargo) $(MVN) clean compile -test: ## Run JUnit 5 tests +test: ## Run unit tests (excludes cloud/Docker integration tests) $(MVN) test +test-cloud: ## Run cloud/Docker integration tests only (requires credentials/Docker) + $(MVN) test -Dtest="$(INTEGRATION_TESTS)" -DfailIfNoTests=false + +test-all: ## Run all tests (unit + cloud/Docker integration) + $(MVN) test -Pintegration-tests + package: ## Build JAR, skip tests (mvn clean package -DskipTests) $(MVN) clean package -DskipTests diff --git a/pom.xml b/pom.xml index fb946b0..610ff4d 100644 --- a/pom.xml +++ b/pom.xml @@ -209,6 +209,13 @@ 1 filesystem + + + **/Real*Test.java + **/AzureIntegrationTest.java + **/AzureOAuthTokenTest.java + ${surefire.argLine} @@ -562,6 +569,23 @@ + + + integration-tests + + + + org.apache.maven.plugins + maven-surefire-plugin + + + + + + + + jdk17plus-native-access