fix: 消除合并后的变量遮蔽以通过检查

This commit is contained in:
Nixevol
2026-09-30 12:12:13 +08:00
parent 7b209ce3d6
commit 4059a1576b
4 changed files with 11 additions and 9 deletions
+1 -1
View File
@@ -371,7 +371,7 @@ func TestRegisterTrustedProxyClientIPLock(t *testing.T) {
locks.Clear(auth.LockKey{Kind: auth.LockRegisterIP, IP: "198.51.100.7"})
locks.Clear(auth.LockKey{Kind: auth.LockRegisterIP, IP: "203.0.113.50"})
for i := 0; i < 10; i++ {
code, resp := post("203.0.113.50:4433", "198.51.100.7", wrong)
code, resp = post("203.0.113.50:4433", "198.51.100.7", wrong)
if code != http.StatusForbidden || resp.Error == nil || resp.Error.Code != protocol.CodeRegistrationCodeInvalid {
t.Fatalf("untrusted fail #%d: status=%d resp=%+v", i+1, code, resp)
}