Documentation ¶ Index ¶ func NewTestDB(t *testing.T) (db *pg.DB, err error) func NewTestPool(ctx context.Context, dropSchemas []string, dropTables ...string) (*pg.Pool, func(), error) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func NewTestDB ¶ func NewTestDB(t *testing.T) (db *pg.DB, err error) NewTestDB creates a new test database. The caller is responsible for cleaning up. The suggested method for cleanup is simply to have an outermost Tx that is rolled back at the end of the test. func NewTestPool ¶ func NewTestPool(ctx context.Context, dropSchemas []string, dropTables ...string) (*pg.Pool, func(), error) Types ¶ This section is empty. Source Files ¶ View all Source files testdb.go Click to show internal directories. Click to hide internal directories.