Context
PR #679 added tests for collectAllowedHosts and effectiveUseNetNS, but coverage has gaps.
Issues
collectAllowedHosts tests only check result count, not content — a bug corrupting Host/Port values would pass
- No YAML round-trip test verifying
allowed_hosts parses correctly from config
- No tests for
convertAllowedHosts converters in cmd/soda/run.go and internal/pipeline/engine.go
- Map iteration order in
collectAllowedHosts is nondeterministic — consider sorting by server name
Fix
- Add content assertions for dedup and single-server cases
- Add config test with
allowed_hosts in YAML testdata
- Add compile-time field coverage check for converters
Found by
Go Specialist review of PR #679.
Context
PR #679 added tests for
collectAllowedHostsandeffectiveUseNetNS, but coverage has gaps.Issues
collectAllowedHoststests only check result count, not content — a bug corrupting Host/Port values would passallowed_hostsparses correctly from configconvertAllowedHostsconverters incmd/soda/run.goandinternal/pipeline/engine.gocollectAllowedHostsis nondeterministic — consider sorting by server nameFix
allowed_hostsin YAML testdataFound by
Go Specialist review of PR #679.