Documentation ¶
Overview ¶
Package tester provides a testing framework for the complete project.
Index ¶
Constants ¶
const ( MigrDriverEnvKey = "MIGRATION_DRIVER" DefaultMigrDriver = "pgx" DSNEnvKey = "DB_URL" DefaultDSN = "postgresql://muhlemmer@db:5432/muhlemmer?sslmode=disable" )
Database configuration
Variables ¶
This section is empty.
Functions ¶
func Run ¶
Run resets the database by migrating Down and Up.
The run function is meant to iniate tests and supply them with Resources as required, returning the value from testing.M.Run().
Database configuration is taken from the environment. See package constants for more details.
func RunWithData ¶
RunWithData resets the database by migrating Down and Up and generating testdata in all tables. The limits of the generated data can be found in Resources, passed to the run function. The run function is meant to iniate tests and supply them with Resources as required, returning the value from testing.M.Run().
Database configuration is taken from the environment. See package constants for more details.