Documentation
¶
Overview ¶
Package integration provides resources for doing integration testing.
Index ¶
Constants ¶
View Source
const ( // DefaultContainerTTL is the default ttl for docker containers DefaultContainerTTL = time.Minute // DefaultMaxConnectTime is the default amount of time to allow connecting DefaultMaxConnectTime = 60 * time.Second // DefaultTag is the default tag for the postgres docker image DefaultTag = "13" // DefaultDockerEndpoint is the default docker endpoint for connections DefaultDockerEndpoint = "" )
Variables ¶
This section is empty.
Functions ¶
func ExpectExit ¶
ExpectExit is a test function for asserting exit codes when exit is called
func RunPostgres ¶
func RunPostgres(integration *Postgres)
RunPostgres runs a new postgres integration
Types ¶
type Postgres ¶
type Postgres struct {
Repository *datastore.Repository
Migration struct {
FS fs.FS
Directory string
}
ImageTag string
ContainerTTL time.Duration
MaxConnectTime time.Duration
DockerEndpoint string
// contains filtered or unexported fields
}
Postgres is an integration for running postgres tests using docker
func NewPostgres ¶
NewPostgres creates a new integration test for postgres
Click to show internal directories.
Click to hide internal directories.