mirror of
https://github.com/juanfont/headscale.git
synced 2026-09-10 02:31:59 +09:00
c22bddfe83
Add equivalence tests that compare the global filter path (PolicyManager.FilterForNode) against the per-node path (compileFilterRulesForNode + ReduceFilterRules) for all golden files where the two paths should produce identical output. TestRoutesCompatGlobalEquivalence: 98 ROUTES files, 12 nodes each. All pass (1,176 comparisons). TestACLCompatGlobalEquivalence: ~152 ACL files (excluding error and autogroup:self cases), 8 nodes each. Surfaces 2 divergences (ACL-M06, ACL-K01) where the global path loses individual non-wildcard source IPs absorbed into the CGNAT range. TestGrantsCompatGlobalEquivalence: ~186 GRANT files (excluding error, autogroup:self, and via cases), 8-15 nodes each. Surfaces 3 divergences (GRANT-P09_7A, GRANT-K29, GRANT-H6) with the same root cause. The per-node path matches Tailscale SaaS golden data in all 5 divergent cases, confirming it preserves nonWildcardSrcs correctly. Updates #3157 Updates #3169