fix(agent): correct usage of task in StartAgentServer and updated test expectations

This commit is contained in:
yusing
2025-10-22 00:02:13 +08:00
parent 203faa8e7e
commit 9c3346dd9d
5 changed files with 9 additions and 8 deletions

View File

@@ -100,7 +100,7 @@ func TestUserPassLoginCallbackHandler(t *testing.T) {
}
auth.PostAuthCallbackHandler(w, req)
if tt.wantErr {
expect.Equal(t, w.Code, http.StatusUnauthorized)
expect.Equal(t, w.Code, http.StatusBadRequest)
} else {
setCookie := expect.Must(http.ParseSetCookie(w.Header().Get("Set-Cookie")))
expect.True(t, setCookie.Name == auth.TokenCookieName())