docker

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2020 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupEtcd added in v1.2.0

func SetupEtcd(testName string) (string, error)

SetupEtcd sets up a etcd database

func SetupPostgresDatabase

func SetupPostgresDatabase(testName string) (*sql.DB, *database.PostgresDatabaseSettings, error)

SetupPostgresDatabase sets up a timescale database

func SetupRedis

func SetupRedis(testName string) (*goredis.Options, error)

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

func TeardownEtcdDatabase(testName string) error

TeardownEtcdDatabase tears down the etcd db

func TeardownKafka

func TeardownKafka(testName string)

TeardownKafka will remove the containers of the test kafka setup

func TeardownPostgresDatabase

func TeardownPostgresDatabase(testName string) error

TeardownPostgresDatabase tears down the postgres db

func TeardownRedis

func TeardownRedis(testName string) error

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

type KafkaSetup struct {
	ZookeeperIP     string
	ProtoRegistryIP string
}

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

type MSSqlDatabaseSettings struct {
	Host     string
	User     string
	Password string
	Name     *string
}

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

func (*NoOpLogger) Printf

func (l *NoOpLogger) Printf(string, ...interface{})

Printf does nothing

Jump to

Keyboard shortcuts

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