gorm store update
This commit is contained in:
@@ -22,7 +22,11 @@ func newTestService(t *testing.T) (*gorm.DB, *service.VersionService, *store.Gor
|
||||
t.Fatalf("failed to migrate: %v", err)
|
||||
}
|
||||
|
||||
storage := store.NewGormStorage(db)
|
||||
storage := store.NewGormStorage(
|
||||
func() *gorm.DB {
|
||||
return db
|
||||
},
|
||||
)
|
||||
service := service.NewVersionService(storage, 5)
|
||||
return db, service, storage
|
||||
}
|
||||
|
||||
@@ -22,7 +22,11 @@ func TestSnapshotInterval(t *testing.T) {
|
||||
t.Fatalf("failed to migrate: %v", err)
|
||||
}
|
||||
|
||||
storage := store.NewGormStorage(db)
|
||||
storage := store.NewGormStorage(
|
||||
func() *gorm.DB {
|
||||
return db
|
||||
},
|
||||
)
|
||||
|
||||
// --- Service with snapshot interval = 3 ---
|
||||
svc := service.NewVersionService(storage, 3)
|
||||
|
||||
Reference in New Issue
Block a user