- Fix race condition in gateway tests by using TestMain to set Gin mode once
- Remove duplicate gin.SetMode(gin.TestMode) calls from individual tests
- Add TestMain function to initialize test environment before all tests
- Prevents race conditions when tests run in parallel with -race flag
- Update golangci-lint-action from v6 to v7
- v6 doesn't support golangci-lint v2.x versions
- v7 supports golangci-lint v2.x and automatically selects compatible version
- Change version from v2.6.0 to latest for automatic compatibility
All tests now pass with race detector enabled.
- Add unit tests for gateway service (services/gateway/gateway_test.go)
- Test gateway creation, route setup, service discovery, and error handling
- Achieve 67.9% code coverage for gateway service
- Test all HTTP methods are properly handled
- Test route matching and 404 handling
- Add tests for API Gateway main entry point (cmd/api-gateway/main_test.go)
- Test DI container setup and structure
- Test service instance creation logic
- Test lifecycle hooks registration
- Add testify dependency for assertions (go.mod)
All tests pass successfully. Proxy forwarding tests are noted for integration
test suite as they require real HTTP connections (per ADR-0028 testing strategy).