Fix F-08, F-13: Adjust lockout expiration logic and enforce password length in tests
- Corrected lockout logic (`IsLockedOut`) to properly evaluate failed login thresholds within the rolling window, ensuring stale attempts outside the window do not trigger lockout. - Updated test passwords in `grpcserver_test.go` to comply with 12-character minimum requirement. - Reformatted import blocks with `goimports` to address lint warnings. - Verified all tests pass and linter is clean.
This commit is contained in:
@@ -498,7 +498,7 @@ func TestUpdateAccount(t *testing.T) {
|
||||
|
||||
createResp, err := cl.CreateAccount(authCtx(adminTok), &mciasv1.CreateAccountRequest{
|
||||
Username: "updateme",
|
||||
Password: "pass12345",
|
||||
Password: "pass123456789",
|
||||
AccountType: "human",
|
||||
})
|
||||
if err != nil {
|
||||
@@ -532,7 +532,7 @@ func TestSetAndGetRoles(t *testing.T) {
|
||||
|
||||
createResp, err := cl.CreateAccount(authCtx(adminTok), &mciasv1.CreateAccountRequest{
|
||||
Username: "roleuser",
|
||||
Password: "pass12345",
|
||||
Password: "pass123456789",
|
||||
AccountType: "human",
|
||||
})
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user