修复角色日志迁移与插件授权测试

This commit is contained in:
xuans committed 2026-09-10 11:49:06 +08:00
1 parent 46fd3a6bff
commit c6071414df
15 files changed
+153 -76

No files matched your search

+3 -5
View File
@@ -24,11 +24,9 @@ func testStore(t *testing.T) *Store {
}
database.SetMaxOpenConns(1)
t.Cleanup(func() { _ = database.Close() })
items := migration.DefaultMigrations()
for _, statement := range items[len(items)-1].StatementsFor(migration.DialectSQLite) {
if _, err := database.Exec(statement); err != nil {
t.Fatal(err)
}
runner := migration.Runner{DB: database, Dialect: migration.DialectSQLite, Migrations: migration.DefaultMigrations()}
if _, err := runner.Run(context.Background()); err != nil {
t.Fatal(err)
}
store, err := New(database, migration.DialectSQLite)
if err != nil {