Documentation
¶
Index ¶
- Constants
- func SharedTestMain(m *testing.M)
- func TestSchema() string
- func WithMigratorAndConnectionToContainer(t *testing.T, fn func(mig *roll.Roll, db *sql.DB))
- func WithMigratorInSchemaAndConnectionToContainer(t *testing.T, schema string, fn func(mig *roll.Roll, db *sql.DB))
- func WithMigratorInSchemaAndConnectionToContainerWithOptions(t *testing.T, schema string, opts []roll.Option, ...)
- func WithStateAndConnectionToContainer(t *testing.T, fn func(*state.State, *sql.DB))
Constants ¶
View Source
const ( CheckViolationErrorCode string = "check_violation" FKViolationErrorCode string = "foreign_key_violation" NotNullViolationErrorCode string = "not_null_violation" UniqueViolationErrorCode string = "unique_violation" )
Variables ¶
This section is empty.
Functions ¶
func SharedTestMain ¶
SharedTestMain starts a postgres container to be used by all tests in a package. Each test then connects to the container and creates a new database.
func TestSchema ¶
func TestSchema() string
TestSchema returns the schema in which migration tests apply migrations. By default, migrations will be applied to the "public" schema.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.