Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Postgres ¶
type Postgres struct {
suite.Suite
// DB is the connection to a test-specific database. After the test the database is dropped.
DB *sql.DB
// ContainerImage can be set before a suite is run. Defaults to postgres:alpine.
ContainerImage string
// contains filtered or unexported fields
}
func (*Postgres) SetupSuite ¶
func (s *Postgres) SetupSuite()
SetupSuite will spin up a postgres container and set the struct variables
func (*Postgres) SetupTest ¶
func (s *Postgres) SetupTest()
SetupTest will create a new database from the test name and set the cancel function to drop it later
func (*Postgres) TearDownSuite ¶
func (s *Postgres) TearDownSuite()
TearDownSuite will close the top-level connection and call the suite cancel function
func (*Postgres) TearDownTest ¶
func (s *Postgres) TearDownTest()
TearDownTest will close the connection and call the cancel function
Click to show internal directories.
Click to hide internal directories.