testutil

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProjectRootPattern = regexp.MustCompile(`^(.*aws-weather-updater).*`)
View Source
var TestDataPath = path.Join(GetProjectRoot(), "test", "data")

Functions

func GetProjectRoot

func GetProjectRoot() string

func RandStringBytes

func RandStringBytes(n int) string

func ResetDatabaseEnv

func ResetDatabaseEnv(t *testing.T)

func SetupPostgres

func SetupPostgres(ctx context.Context, t *testing.T) testcontainers.Container

func ShutdownContainer

func ShutdownContainer(ctx context.Context, t *testing.T, container testcontainers.Container)

Types

type GeneratedContainerReport

type GeneratedContainerReport struct {
	Container testcontainers.Container
	Host      string
	Port      string
}

type PostgresContainer

type PostgresContainer struct {
	testcontainers.Container
	Host   string
	Port   string
	User   string
	Pass   string
	DbName string
}

Jump to

Keyboard shortcuts

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