Files
NTrace-core/cmd
tsosunchia aa3df62875 Add tests for DN42 and PTR record functionalities
- Added focused unit tests for listener parsing helpers so buildListenInfo and isDigitsOnly are now validated without invoking the full CLI stack (cmd/listen_info_test.go:10-32).
  - Replaced placeholder DN42 tests with deterministic coverage for geofeed parsing and PTR matching, using temp CSV fixtures to check both positive and negative paths (dn42/geofeed_test.go:13-57, dn42/ptr_test.go:13-56).
  - Rebuilt the ipgeo tests to assert provider lookup mappings, DN42 integration (including PTR fallback and “unknown” defaults), and the disableGeoIP shim (ipgeo/ipgeo_test.go:12-53, ipgeo/dn42_test.go:14-78).
  - Introduced environment helper tests that exercise trimming, boolean, default, and integer reads without touching external DNS (util/env_test.go:9-46).
  - Removed legacy network-dependent tests that only printed output, ensuring the suite is deterministic.
2025-10-29 13:27:37 +08:00
..