Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DbIntegrationTestBaseSuite ¶
type DbIntegrationTestBaseSuite struct { suite.Suite DB *sql.DB InsertedValues *db_populator.KnownValues // contains filtered or unexported fields }
Base test suite for integration tests requiring sql database connection
func (*DbIntegrationTestBaseSuite) SetupSuite ¶
func (s *DbIntegrationTestBaseSuite) SetupSuite()
Runs once at test suite setup. Creates test psql container, creates a databse connection and sets a pointer to it as the struct field.
func (*DbIntegrationTestBaseSuite) SetupTest ¶
func (s *DbIntegrationTestBaseSuite) SetupTest()
Runs before each test. Migrates the database up, runs population (seeding) function.
func (*DbIntegrationTestBaseSuite) TearDownSuite ¶
func (s *DbIntegrationTestBaseSuite) TearDownSuite()
Ran when the suite is done. Closes the DB conenction and terminates the container.
func (*DbIntegrationTestBaseSuite) TearDownTest ¶
func (s *DbIntegrationTestBaseSuite) TearDownTest()
Runs after each test. Migrates the DB all the way down, removing all data.
type PostgreSQLContainer ¶
Click to show internal directories.
Click to hide internal directories.