mirror of
https://github.com/juanfont/headscale.git
synced 2026-04-11 03:27:20 +02:00
Replace 8,286 lines of inline Go struct test expectations in tailscale_routes_compat_test.go with 92 JSON golden files in testdata/routes_results/ROUTES-*.json and a ~300-line Go driver in tailscale_routes_data_compat_test.go. Unlike the ACL and grants compat tests which use shared hardcoded node topologies, the routes driver builds nodes from JSON topology data. Each test file embeds its full topology including routable_ips and approved_routes, making test files self-contained. This naturally handles the IPv6 tests which use a different 4-node topology from the standard 9-node setup. Test count is preserved: 92 test cases across 19 original test functions (SubnetBasics, ExitNodes, HARouters, FilterPlacement, RouteCoverage, Overlapping, TagResolution, ProtocolPort, IPv6, EdgeCases, AutoApprover, and additional variants). Updates #2180