tests: add tests for user controller

This commit is contained in:
Stavros
2026-03-28 20:26:47 +02:00
parent b2ab3d0f37
commit 39beed706b
3 changed files with 309 additions and 267 deletions

View File

@@ -746,3 +746,10 @@ func (auth *AuthService) ensureOAuthSessionLimit() {
}
}
}
// Function only used for testing - do not use in prod!
func (auth *AuthService) ClearRateLimitsTestingOnly() {
auth.loginMutex.Lock()
auth.loginAttempts = make(map[string]*LoginAttempt)
auth.loginMutex.Unlock()
}