From c979d82c507771a3e672ec727d3f89e0b84734fa Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Tue, 20 Oct 2026 16:22:20 +0000 Subject: [PATCH] hscontrol, servertest: fail on any unread pending login or expiry entry Each map serves one capture, so a misspelled capture name never went stale. --- hscontrol/auth_compat_test.go | 3 ++- hscontrol/servertest/expiry_compat_test.go | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hscontrol/auth_compat_test.go b/hscontrol/auth_compat_test.go index 9dfaa7547..233e4ee88 100644 --- a/hscontrol/auth_compat_test.go +++ b/hscontrol/auth_compat_test.go @@ -72,8 +72,9 @@ func runPendingLoginCompat(t *testing.T, id string) { r.step(t, step) } + // The map serves this capture alone, so every entry must name a check. for k := range pendingLoginSkipReasons { - if strings.HasPrefix(k, id+"/") && !r.evaluated[k] { + if !r.evaluated[k] { t.Errorf("skip entry %q names no check", k) } } diff --git a/hscontrol/servertest/expiry_compat_test.go b/hscontrol/servertest/expiry_compat_test.go index 54e387ba1..a87394e8a 100644 --- a/hscontrol/servertest/expiry_compat_test.go +++ b/hscontrol/servertest/expiry_compat_test.go @@ -240,8 +240,9 @@ func runNodeExpiryCompat(t *testing.T, id, observer string) { prevCaps = step.Captures } + // The map serves this capture alone, so every entry must name a check. for k := range expirySkipReasons { - if strings.HasPrefix(k, id+"/") && !evaluated[k] { + if !evaluated[k] { t.Errorf("skip entry %q names no check", k) } }