mirror of
https://github.com/juanfont/headscale.git
synced 2026-11-04 04:34:07 +09:00
hscontrol, servertest: fail on any unread pending login or expiry entry
Each map serves one capture, so a misspelled capture name never went stale.
This commit is contained in:
1 parent
e4752f06c5
commit
c979d82c50
2 files changed
+4
-2
No files matched your search
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user