postgres

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultPostgresImageName specifies the Postgres docker image name to use in tests.
	DefaultPostgresImageName = "postgres"
	// DefaultPostgresEnvVarImageName is the environment variable name for default Postgres docker image name.
	DefaultPostgresEnvVarImageName = "TEST_POSTGRES_IMAGE_NAME"
	// DefaultPostgresImageVersion specifies the Postgres docker image version to use in tests.
	DefaultPostgresImageVersion = "9.6.17"
	// DefaultPostgresEnvVarImageVersion is the environment variable name for default Postgres docker image version.
	DefaultPostgresEnvVarImageVersion = "TEST_POSTGRES_IMAGE_VERSION"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type TestEnvContext

type TestEnvContext interface {
	Cleanup()
	ContainerIP() string
	ContainerPrivatePort() string
	ContainerPublicPort() string
	PostgresDatabase() string
	PostgresPass() string
	PostgresUser() string
}

TestEnvContext represents a test Postgres environment context.

func SetupTestPostgres

func SetupTestPostgres(t *testing.T) TestEnvContext

SetupTestPostgres sets up Postgres environment for tests. This environment can be passed to other Ory components in tests.

Jump to

Keyboard shortcuts

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