fix(auth): align lockout check ordering

This commit is contained in:
mlogclub
2026-04-30 17:57:28 +08:00
parent 9d74df5b37
commit 34e27dffca
2 changed files with 10 additions and 6 deletions
+7
View File
@@ -324,6 +324,13 @@ func setupAuthServiceTestDB(t *testing.T) *gorm.DB {
t.Fatalf("migrate auth tables: %v", err)
}
sqls.SetDB(db)
t.Cleanup(func() {
sqls.SetDB(nil)
sqlDB, err := db.DB()
if err == nil {
_ = sqlDB.Close()
}
})
return db
}