fix: 消除合并后的变量遮蔽以通过检查
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user