Commit 82c6f84
Add focused test coverage for YAML transform functions (#2590)
Add comprehensive tests for the transform functions in yaml_loader.go,
focusing on actual logic rather than field copying:
Test Coverage:
- transformBackendAuthStrategy (100%): Environment variable resolution,
mutual exclusivity validation, empty string detection, missing config
blocks, and lazy evaluation for token exchange
- transformTokenCache (90.9%): Duration parsing for memory/redis caches,
invalid duration handling, and complex duration formats
- transformOperational (100%): Multiple duration field parsing with
detailed error messages including workload names, circuit breaker
disabled edge case
- transformCompositeTools (96.3%): Parameter type validation, missing
type field detection, timeout defaults and parsing
- transformWorkflowStep (90.9%): Type inference logic, elicitation
default timeouts, explicit overrides, retry delay parsing
The tests use table-driven approach with testify assertions for
compactness and readability. Each test focuses on logic that can
actually fail (validation, parsing, inference) rather than testing
struct field assignment which would just verify the Go compiler works.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude <noreply@anthropic.com>1 parent c94268a commit 82c6f84
1 file changed
+759
-0
lines changed
0 commit comments