Documentation
¶
Index ¶
- func CreateTestDB(t *testing.T, migrationsPath string) *pgx.Conn
- func Migrate(t *testing.T, databaseURL string, migrationsPath string)
- func MustParsePGUUID(src string) pgtype.UUID
- func MustStartPostgresContainer(t *testing.T, ctx context.Context) testcontainers.Container
- func ParsePGUUID(src string) (pgtype.UUID, error)
- func ParseUUID(src string) (dst [16]byte, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTestDB ¶
nolint:contextcheck CreateTestDB spawns a new postgres container (if not spawned yet) Runs migrations on the main database (if not run yet) Creates a new database for the test and returns a connection to it The test database is dropped after the test
func MustParsePGUUID ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.