tests

package
v0.2.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvTestPostgres = "TEST_POSTGRES"
)

ENV constants for testing

Variables

This section is empty.

Functions

func EnvBool

func EnvBool(env string) bool

func GuardPostgresTests

func GuardPostgresTests(t *testing.T)

Types

type PostgresContainer

type PostgresContainer struct {
	// contains filtered or unexported fields
}

PostgresContainer represents a test docker container with Postgres database.

func NewPostgresContainer

func NewPostgresContainer(t *testing.T) *PostgresContainer

NewPostgresContainer start a new PG container Read more: https://golang.testcontainers.org/modules/postgres/ Automatically cleans up the container after the test.

func (*PostgresContainer) CreateDB

func (p *PostgresContainer) CreateDB(database string)

func (*PostgresContainer) URL

func (p *PostgresContainer) URL(database string) string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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