修改事务提交调用问题
This commit is contained in:
@@ -13,7 +13,7 @@ import (
|
||||
// SetupDBTest 创建一个基于 SQLite 内存数据库的 GORM 连接
|
||||
func SetupDBTest(t *testing.T) *gorm.DB {
|
||||
// 使用 SQLite 内存数据库
|
||||
gormDB, err := gorm.Open(sqlite.Open("file::memory:?cache=shared"), &gorm.Config{})
|
||||
gormDB, err := gorm.Open(sqlite.Open(":memory:"), &gorm.Config{})
|
||||
if err != nil {
|
||||
t.Fatalf("gorm 打开 SQLite 内存数据库失败: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user