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:
2026-03-11 21:36:04 -07:00
parent 8aea81bc47
commit 9b0adfdde4
3 changed files with 32 additions and 92 deletions

View File

@@ -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 {