Skip to content

Commit dac8445

Browse files
authored
refactor: use new cache store in services (tinyauthapp#912)
1 parent 940ba6d commit dac8445

6 files changed

Lines changed: 723 additions & 195 deletions

File tree

Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,15 @@ binary-linux-arm64:
6262
test:
6363
go test -v ./...
6464

65+
# Go vet
66+
.PHONY: vet
67+
vet:
68+
go vet ./...
69+
70+
# Go race
71+
test-race:
72+
go test -race ./...
73+
6574
# Development
6675
dev:
6776
docker compose -f $(DEV_COMPOSE) up --force-recreate --pull=always --remove-orphans --build

internal/controller/user_controller_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ func TestUserController(t *testing.T) {
422422

423423
beforeEach := func() {
424424
// Clear failed login attempts before each test
425-
authService.ClearRateLimitsTestingOnly()
425+
authService.ClearLoginAttempts()
426426
}
427427

428428
for _, test := range tests {

internal/middleware/context_middleware_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ func TestContextMiddleware(t *testing.T) {
263263
contextMiddleware := middleware.NewContextMiddleware(log, runtime, authService, broker, nil)
264264

265265
for _, test := range tests {
266-
authService.ClearRateLimitsTestingOnly()
266+
authService.ClearLoginAttempts()
267267
t.Run(test.description, func(t *testing.T) {
268268
gin.SetMode(gin.TestMode)
269269

0 commit comments

Comments
 (0)