test: add comprehensive test coverage and improve code quality
- Add new test files for auth, service, and handler modules - Improve test organization and coverage - Refactor code for better maintainability - Add captcha, settings, stats, and theme handler tests - Add auth module tests (CAS, OAuth, password, SSO, state) - Add service layer tests for auth, export, permissions, roles - All Go tests pass (exit code 0) - All frontend tests pass (325 tests in 59 files)
This commit is contained in:
@@ -5,10 +5,10 @@ package testdb
|
||||
import (
|
||||
"testing"
|
||||
|
||||
_ "modernc.org/sqlite" // 注册纯Go SQLite驱动,驱动名 "sqlite"
|
||||
gormsqlite "gorm.io/driver/sqlite"
|
||||
"gorm.io/gorm"
|
||||
"gorm.io/gorm/logger"
|
||||
_ "modernc.org/sqlite" // 注册纯Go SQLite驱动,驱动名 "sqlite"
|
||||
)
|
||||
|
||||
// Open 使用 modernc.org/sqlite(纯Go,无需CGO)打开内存测试数据库。
|
||||
|
||||
Reference in New Issue
Block a user