Documentation ¶
Index ¶
Constants ¶
View Source
const ( MainDbName = "main-db" MainDbUser = "postgres" MainDbPassword = "password" )
View Source
const TestSnapshotId = "test-snapshot"
Variables ¶
This section is empty.
Functions ¶
func SetupDatabaseConnection ¶
func SetupDatabaseConnection(ctx context.Context, containers ...*PostgresContainer) *dbx.ShardManager
SetupDatabaseConnection - Setup Database configuration for tests.
Types ¶
type PostgresContainer ¶
type PostgresContainer struct { Container *postgres.PostgresContainer MappedPort nat.Port Host string DbName string DbUser string DbPassword string DbShard dbx.DbShard PrepStatements []dbx.PreparedStatement }
PostgresContainer represents the postgres Container type used in the module.
func StartPostgresContainer ¶
func StartPostgresContainer(ctx context.Context, t *testing.T, preparesStatements []dbx.PreparedStatement) *PostgresContainer
StartPostgresContainer - startContainer creates an instance of the pubsub Container type.
func StartPostgresContainerWithInitScript ¶
func StartPostgresContainerWithInitScript(ctx context.Context, t *testing.T, initScriptPath string, preparesStatements []dbx.PreparedStatement) *PostgresContainer
func (*PostgresContainer) StopContainer ¶
Click to show internal directories.
Click to hide internal directories.