Documentation
¶
Index ¶
- func EventuallyWithTf(t *testing.T, fn func(c *assert.CollectT, saveErr func(err any)), ...)
- func GetRFC3339Time(t *testing.T, timeString string) time.Time
- func InitPostgresDB(t *testing.T) *entsql.Driver
- func NewLogger(t testing.TB) *slog.Logger
- type EntMigrator
- func (m *EntMigrator) Hash() (string, error)
- func (m *EntMigrator) Migrate(ctx context.Context, db *sql.DB, templateConf pgtestdb.Config) error
- func (*EntMigrator) Prepare(_ context.Context, _ *sql.DB, _ pgtestdb.Config) error
- func (*EntMigrator) Verify(_ context.Context, _ *sql.DB, _ pgtestdb.Config) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EventuallyWithTf ¶
Types ¶
type EntMigrator ¶
type EntMigrator struct{}
EntMigrator is a migrator for pgtestdb.
func (*EntMigrator) Hash ¶
func (m *EntMigrator) Hash() (string, error)
Hash returns the md5 hash of the schema file.
func (*EntMigrator) Migrate ¶
func (m *EntMigrator) Migrate( ctx context.Context, db *sql.DB, templateConf pgtestdb.Config, ) error
Migrate shells out to the `atlas` CLI program to migrate the template database.
atlas schema apply --auto-approve --url $DB --to file://$schemaFilePath
Click to show internal directories.
Click to hide internal directories.