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.
Click to show internal directories.
Click to hide internal directories.