Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DB *pgx.ConnPool // db connection used throughout testing StdlibDB *sql.DB // golang standard lib compatible db for 'database/sql' )
Functions ¶
func MustParseTime ¶ added in v0.2019.11
func PrepDatabase ¶
PrepDatabase readies the db into a clean state. This should be called before doing any interaction with the database in each test.
func Setup ¶
func Setup(testdataPath string)
Setup should be called in TestMain, to assign the necessary globals used behind the scenes in all database-related tests (that is, db conns, loggers, and test data). After this is run, tests should call PrepDatabase() before doing work, to ensure the database state matches the test data.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.