policy/v2: name the tester compat skip lists like the others

Updates #3355
This commit is contained in:
Kristoffer Dalby committed 2026-11-11 12:06:27 +01:00
1 parent 7989fed78e
commit 626f400d54
3 files changed
+9 -9

No files matched your search

@@ -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 <test_id>/<check>.
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)
})
}
}
+5 -5
View File
@@ -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 <test_id>/<check>.
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)
})
}
}
@@ -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