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
+2 -2
View File
@@ -304,9 +304,9 @@ func TestAdminLockDoesNotBlockAuthedSession(t *testing.T) {
for i := 0; i < 10; i++ {
bad := &http.Client{}
res := postJSON(t, bad, base+"/api/admin/login",
res = postJSON(t, bad, base+"/api/admin/login",
`{"username":"admin","password":"wrong-password!!"}`, nil)
env := decodeEnv(t, res)
env = decodeEnv(t, res)
if i < 9 {
if res.StatusCode != 401 {
t.Fatalf("fail %d: want 401 got %d %+v", i, res.StatusCode, env)