test

package
v0.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL