@@ -18,21 +18,62 @@ clean: ## Clean build artifacts
1818# Test targets
1919test : test-unit test-contract # # Run all tests (excluding integration tests)
2020
21- test-unit : # # Run unit tests
22- go test ./tests/unit/... -v
21+ test-unit : # # Run unit tests using Ginkgo
22+ @echo " Running unit tests with Ginkgo..."
23+ ginkgo run --label-filter=" unit" --junit-report=reports/junit.xml --json-report=reports/results.json test/unit
24+
25+ test-unit-go : # # Run unit tests with go test (alternative)
26+ go test -v -tags=test ./handlers ./types ./git -timeout=5m
2327
2428test-contract : # # Run contract tests
2529 go test ./tests/contract/... -v
2630
2731test-integration : # # Run integration tests (requires Kubernetes cluster)
2832 @echo " Running integration tests (requires Kubernetes cluster access)..."
29- go test ./tests/integration/... -v - timeout=5m
33+ USE_REAL_CLUSTER=true CLEANUP_RESOURCES=true ginkgo run --label-filter= " integration " -- timeout=10m
3034
3135test-integration-short : # # Run integration tests with short timeout
3236 go test ./tests/integration/... -v -short
3337
3438test-all : test test-integration # # Run all tests including integration tests
3539
40+ # Ginkgo-specific test targets
41+ test-ginkgo : # # Run all tests using Ginkgo framework
42+ @echo " Running all tests with Ginkgo..."
43+ ginkgo run --junit-report=reports/junit.xml --json-report=reports/results.json
44+
45+ test-ginkgo-parallel : # # Run tests in parallel
46+ @echo " Running tests in parallel..."
47+ ginkgo run -p --junit-report=reports/junit.xml --json-report=reports/results.json
48+
49+ test-ginkgo-verbose : # # Run tests with verbose output
50+ @echo " Running tests with verbose output..."
51+ ginkgo run -v --junit-report=reports/junit.xml --json-report=reports/results.json
52+
53+ test-handlers : # # Run handler tests only
54+ @echo " Running handler tests..."
55+ ginkgo run --tags=test --label-filter=" handlers" -v
56+
57+ test-types : # # Run type tests only
58+ @echo " Running type tests..."
59+ ginkgo run --tags=test --label-filter=" types" -v
60+
61+ test-git : # # Run git operation tests only
62+ @echo " Running git operation tests..."
63+ ginkgo run --tags=test --label-filter=" git" -v
64+
65+ test-fast : # # Run tests excluding slow ones
66+ @echo " Running fast tests only..."
67+ SKIP_SLOW_TESTS=true ginkgo run --tags=test --label-filter=" !slow"
68+
69+ test-auth : # # Run authentication and authorization tests
70+ @echo " Running auth tests..."
71+ ginkgo run --tags=test --label-filter=" auth" -v
72+
73+ test-focus : # # Run specific test by pattern (usage: make test-focus FOCUS="test pattern")
74+ @echo " Running focused tests: $( FOCUS) "
75+ ginkgo run --focus=" $( FOCUS) " -v
76+
3677# Test with specific configuration
3778test-integration-local : # # Run integration tests with local configuration
3879 @echo " Running integration tests with local configuration..."
@@ -88,7 +129,10 @@ vet: ## Run go vet
88129 go vet ./...
89130
90131lint : # # Run golangci-lint (requires golangci-lint to be installed)
91- golangci-lint run
132+ # Lint production build
133+ golangci-lint run --timeout=5m
134+ # Lint test build (handlers unit tests use -tags=test for test-only hooks)
135+ golangci-lint run --timeout=5m --build-tags=test
92136
93137# Dependency management
94138deps : # # Download dependencies
@@ -106,6 +150,7 @@ install-tools: ## Install development tools
106150 @echo " Installing development tools..."
107151 go install github.com/cosmtrek/air@latest
108152 go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
153+ go install github.com/onsi/ginkgo/v2/ginkgo@latest
109154
110155# Kubernetes-specific targets for integration testing
111156k8s-setup : # # Setup local Kubernetes for testing (requires kubectl and kind)
0 commit comments