testing

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 20, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContainerizedPostgres

func ContainerizedPostgres(t *testing.T, conf *db.DbConf)

EmbeddedPostgres spins up a postgres container.

Types

type PostgresStrategy

type PostgresStrategy struct {
	Port nat.Port
	// contains filtered or unexported fields
}

PostgresStrategy a wait.Strategy to wait on Postgres to start.

func NewPostgresStrategy

func NewPostgresStrategy(port nat.Port, dbConf *db.DbConf) *PostgresStrategy

NewPostgresStrategy constructs a default host port strategy

func (*PostgresStrategy) WaitUntilReady

func (hp *PostgresStrategy) WaitUntilReady(ctx context.Context, target wait.StrategyTarget) (err error)

WaitUntilReady implements Strategy.WaitUntilReady

func (*PostgresStrategy) WithStartupTimeout

func (hp *PostgresStrategy) WithStartupTimeout(startupTimeout time.Duration) *PostgresStrategy

WithStartupTimeout sets startupTimeout

Jump to

Keyboard shortcuts

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