From dc1878ce3ba094ab5589c270d69c262dbe116d56 Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Tue, 10 Nov 2026 07:03:12 +0000 Subject: [PATCH] policy/v2: name the tester compat skip lists like the others Updates #3355 --- hscontrol/policy/v2/policytester_compat_test.go | 6 +++--- hscontrol/policy/v2/sshtester_compat_test.go | 10 +++++----- hscontrol/policy/v2/tailscale_ssh_data_compat_test.go | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/hscontrol/policy/v2/policytester_compat_test.go b/hscontrol/policy/v2/policytester_compat_test.go index 56fc0d1bd..efdcb6522 100644 --- a/hscontrol/policy/v2/policytester_compat_test.go +++ b/hscontrol/policy/v2/policytester_compat_test.go @@ -34,9 +34,9 @@ import ( tsapi "tailscale.com/client/tailscale/v2" ) -// knownPolicyTesterDivergences lists checks where headscale's evaluator +// policyTesterSkipReasons lists checks where headscale's evaluator // differs from Tailscale SaaS, keyed /. -var knownPolicyTesterDivergences = map[string]string{ //nolint:gosec // strings here are human-readable notes, not credentials +var policyTesterSkipReasons = map[string]string{ "policytest-accept-fail-proto-icmp-not-allowed/breakdown": testEntryErrors, "policytest-proto-icmp/breakdown": testEntryErrors, @@ -66,7 +66,7 @@ func TestPolicyTesterCompat(t *testing.T) { t.Run(c.TestID, func(t *testing.T) { t.Parallel() - runTesterCompat(t, c, knownPolicyTesterDivergences) + runTesterCompat(t, c, policyTesterSkipReasons) }) } } diff --git a/hscontrol/policy/v2/sshtester_compat_test.go b/hscontrol/policy/v2/sshtester_compat_test.go index 9f5f92f0f..eb24dc59e 100644 --- a/hscontrol/policy/v2/sshtester_compat_test.go +++ b/hscontrol/policy/v2/sshtester_compat_test.go @@ -1,6 +1,6 @@ // Replay golden HuJSON captures under testdata/sshtest_results/*.hujson with -// the checks of [runTesterCompat]. Divergences are listed in -// knownSSHTesterDivergences with the engine gap each represents. +// the checks of [runTesterCompat]. Skips are listed in +// sshTesterSkipReasons with the engine gap each represents. package v2 @@ -12,9 +12,9 @@ import ( "github.com/stretchr/testify/require" ) -// knownSSHTesterDivergences names the engine gap for each check where +// sshTesterSkipReasons names the engine gap for each check where // headscale and upstream disagree, keyed /. -var knownSSHTesterDivergences = map[string]string{} +var sshTesterSkipReasons = map[string]string{} func TestSSHTesterCompat(t *testing.T) { t.Parallel() @@ -30,7 +30,7 @@ func TestSSHTesterCompat(t *testing.T) { t.Run(c.TestID, func(t *testing.T) { t.Parallel() - runTesterCompat(t, c, knownSSHTesterDivergences) + runTesterCompat(t, c, sshTesterSkipReasons) }) } } diff --git a/hscontrol/policy/v2/tailscale_ssh_data_compat_test.go b/hscontrol/policy/v2/tailscale_ssh_data_compat_test.go index 48310939c..38b97885b 100644 --- a/hscontrol/policy/v2/tailscale_ssh_data_compat_test.go +++ b/hscontrol/policy/v2/tailscale_ssh_data_compat_test.go @@ -2,7 +2,7 @@ // the 200 path compares headscale's compileSSHPolicy output node-by-node // against the captured SSHRules; the non-200 path requires headscale to // reject the same input with the captured error body as a substring. -// Divergences are listed in sshSkipReasons (200) and sshRejectSkipReasons +// Skips are listed in sshSkipReasons (200) and sshRejectSkipReasons // (non-200) with the engine gap each represents. package v2