Versions in this module Expand all Collapse all v0 v0.14.0 Apr 24, 2024 v0.13.0 Feb 27, 2024 Changes in this version + func EnableDBRecordMode() suitetest.PackageOptions + func IsRecording() bool + func PrepareData(di *DI, steps ...DataSetupStep) test.SetupFunc + func PrepareDataWithScope(di *DI, scope DataSetupScope, steps ...DataSetupStep) test.SetupFunc + func WithDBPlayback(dbName string, opts ...DBOptions) test.Options + func WithNoopMocks() test.Options + type DBOption struct + DBName string + Host string + Password string + Port int + SSL bool + Username string + type DBOptions func(opt *DBOption) + func DBCredentials(user, password string) DBOptions + func DBHost(host string) DBOptions + func DBName(db string) DBOptions + func DBPort(port int) DBOptions + type DI struct + DB *gorm.DB + type DataSetupScope func(ctx context.Context, t *testing.T, db *gorm.DB) (context.Context, *gorm.DB) + func SetupWithGormScopes(scopes ...func(*gorm.DB) *gorm.DB) DataSetupScope + type DataSetupStep func(ctx context.Context, t *testing.T, db *gorm.DB) context.Context + func SetupDropTables(tables ...string) DataSetupStep + func SetupOnce(once *sync.Once, steps ...DataSetupStep) DataSetupStep + func SetupTruncateTables(tables ...string) DataSetupStep + func SetupUsingModelSeedFile(fsys fs.FS, dest interface{}, filename string, ...) DataSetupStep + func SetupUsingSQLFile(fsys fs.FS, filenames ...string) DataSetupStep + func SetupUsingSQLQueries(queries ...string) DataSetupStep