Documentation ¶
Index ¶
- func SetupEtcd(testName string) (string, error)
- func SetupPostgresDatabase(testName string) (*sql.DB, *database.PostgresDatabaseSettings, error)
- func SetupRedis(testName string) (*goredis.Options, error)
- func TeardownDatabase(testName string)
- func TeardownEtcdDatabase(testName string) error
- func TeardownKafka(testName string)
- func TeardownPostgresDatabase(testName string) error
- func TeardownRedis(testName string) error
- type DatabaseSetup
- type KafkaSetup
- type MSSqlDatabaseSettings
- type NoOpLogger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetupPostgresDatabase ¶
SetupPostgresDatabase sets up a timescale database
func SetupRedis ¶
SetupRedis sets up a redis store
func TeardownDatabase ¶
func TeardownDatabase(testName string)
TeardownDatabase will teardown the test database
func TeardownEtcdDatabase ¶ added in v1.2.0
TeardownEtcdDatabase tears down the etcd db
func TeardownKafka ¶
func TeardownKafka(testName string)
TeardownKafka will remove the containers of the test kafka setup
func TeardownPostgresDatabase ¶
TeardownPostgresDatabase tears down the postgres db
func TeardownRedis ¶
TeardownRedis tears down the redis store
Types ¶
type DatabaseSetup ¶
type DatabaseSetup struct { TestName string DatabaseImage *string UserName string Password string DatabaseName *string }
DatabaseSetup is the settings for the test database
type KafkaSetup ¶
KafkaSetup is the details about the kafka setup
func SetupKafka ¶
func SetupKafka(testName string) (*KafkaSetup, error)
SetupKafka sets up the zookeeper and kafka test containers
type MSSqlDatabaseSettings ¶
MSSqlDatabaseSettings is the settings for the database
func SetupAdminDatabase ¶
func SetupAdminDatabase(setup DatabaseSetup) (*MSSqlDatabaseSettings, error)
SetupAdminDatabase will setup a test database
func (*MSSqlDatabaseSettings) GetDB ¶
func (ds *MSSqlDatabaseSettings) GetDB() (*sql.DB, error)
GetDB will return a database instance from the settings
func (*MSSqlDatabaseSettings) WaitForDatabaseToBeOnline ¶
func (ds *MSSqlDatabaseSettings) WaitForDatabaseToBeOnline(secondsToWait int) error
WaitForDatabaseToBeOnline will wait for the database server to be online for the given seconds.
type NoOpLogger ¶
type NoOpLogger struct{}
NoOpLogger is a logger that does nothing
func (*NoOpLogger) Panicf ¶
func (l *NoOpLogger) Panicf(msg string, args ...interface{})
Panicf will panic