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 ¶
SetupPostgresConnection creates a connection to the test PostgreSQL container. This must be run after SetupPostgresContainer.
func SetupPostgresContainer ¶
SetupPostgresContainer creates a PostgreSQL container for testing purposes. The created container is accessible through the PostgresContainer global.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.