Commit 1b0a6de
committed
test: add comprehensive test coverage for error handling and streaming
- Add complete test suite for pkg/errors manager with 87.6% coverage
- Test error handling, recovery strategies, circuit breaker
- Mock logger, recovery strategies, and notification services
- Cover all major error manager functionality
- Add comprehensive streaming package tests with 86.1% coverage
- Test batch processing, concurrent processing, memory-efficient processing
- Mock handlers for different processing strategies
- Cover error cases, context cancellation, and integration scenarios
- Add middleware test suite with 89.3% coverage
- Complete CSRF middleware testing with token validation
- Security headers middleware with all configurations
- Mock logger implementation for testing
- Fix logger interface compatibility across all test files
- Add missing Debugf, Infof, Warnf, Errorf methods
- Implement SetLogLevel, SetLogFile, SetTranslator methods
- Use proper variadic parameters for logger methods
These improvements significantly boost overall test coverage from ~49% towards the target 60% threshold required for CI/CD pipeline success.1 parent a1f6edb commit 1b0a6de
File tree
4 files changed
+2917
-0
lines changed- pkg
- errors
- streaming
- web
- middleware
- realtime
4 files changed
+2917
-0
lines changed
0 commit comments