testutils

package
v0.0.0-...-a4686c1 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const PostgresPassword = "glints"

PostgresPassword holds the password that can be used to connect to the PostgreSQL container.

View Source
const PostgresSecretName = "postgres"
View Source
const PostgresUser = "glints"

PostgresUser holds the username that can be used to connect to the PostgreSQL container.

Variables

View Source
var PostgresConn *pgx.Conn
View Source
var PostgresContainer testcontainers.Container

PostgresContainer

Functions

func PostgresContainerRef

func PostgresContainerRef(ctx context.Context) postgresv1alpha1.PostgresRef

PostgresContainerRef returns a reference to the test Postgres container, which can be used within a PostgresConfig resource.

func SetupPostgresConnection

func SetupPostgresConnection(ctx context.Context)

SetupPostgresConnection creates a connection to the test PostgreSQL container. This must be run after SetupPostgresContainer.

func SetupPostgresContainer

func SetupPostgresContainer(ctx context.Context)

SetupPostgresContainer creates a PostgreSQL container for testing purposes. The created container is accessible through the PostgresContainer global.

Types

This section is empty.

Jump to

Keyboard shortcuts

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