Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrContainerNotInitialized = errors.New("container is not initialized")
Functions ¶
func QueryMatcher ¶
func RunMigrations ¶
RunMigrations runs the database schema migration.
Types ¶
type IntegrationBaseSuite ¶
type IntegrationBaseSuite struct { suite.Suite Config config.Config DB database.Database RedisClient *redis.Client RedisContainer *RedisContainer PGContainer *PostgreSQLContainer }
func (*IntegrationBaseSuite) SetupSuite ¶
func (s *IntegrationBaseSuite) SetupSuite()
func (*IntegrationBaseSuite) TearDownSuite ¶
func (s *IntegrationBaseSuite) TearDownSuite()
type PostgreSQLContainer ¶
type PostgreSQLContainer struct {
TestContainer
}
func NewPostgresContainer ¶
func NewPostgresContainer() (*PostgreSQLContainer, error)
NewPostgresContainer creates a new postgres database docker container for testing.
type RedisContainer ¶
type RedisContainer struct {
TestContainer
}
func NewRedisContainer ¶
func NewRedisContainer() (*RedisContainer, error)
NewRedisContainer creates a new redis docker container for testing.
func (*RedisContainer) Connect ¶
func (c *RedisContainer) Connect() (*redis.Client, error)
Connect returns a new redis client to the RedisContainer.
type TestContainer ¶
type TestContainer struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.