style: 合入后修 gofmt/govet 与 RegistrationView 类型检查
This commit is contained in:
@@ -508,7 +508,9 @@ WHERE m.id='late-1' AND d.endpoint_id='bob'`).Scan(&bobN); err != nil {
|
||||
app, db := openTestApp(t, lim)
|
||||
insertEndpoint(t, db, "alice", "", 1, 0)
|
||||
insertEndpoint(t, db, "bob", "", 1, 0)
|
||||
if !app.AllowRequest("alice") || !app.AllowRequest("alice") {
|
||||
first := app.AllowRequest("alice")
|
||||
second := app.AllowRequest("alice")
|
||||
if !first || !second {
|
||||
t.Fatal("burst should allow first two")
|
||||
}
|
||||
if app.AllowRequest("alice") {
|
||||
@@ -544,9 +546,9 @@ func TestU03SubmitTalkLockNoIP(t *testing.T) {
|
||||
for i := 0; i < 10; i++ {
|
||||
bad := baseSend(fmt.Sprintf("w%d", i), "bob")
|
||||
bad.TalkPassword = "wrong"
|
||||
_, err := app.Submit(ctx, "alice", port.ConnInfo{RemoteIP: fmt.Sprintf("10.0.0.%d", i+1)}, bad)
|
||||
if protoCode(err) != protocol.CodeTalkPasswordInvalid {
|
||||
t.Fatalf("i=%d got %v", i, err)
|
||||
_, subErr := app.Submit(ctx, "alice", port.ConnInfo{RemoteIP: fmt.Sprintf("10.0.0.%d", i+1)}, bad)
|
||||
if protoCode(subErr) != protocol.CodeTalkPasswordInvalid {
|
||||
t.Fatalf("i=%d got %v", i, subErr)
|
||||
}
|
||||
}
|
||||
empty := baseSend("empty", "bob")
|
||||
|
||||
Reference in New Issue
Block a user