postgrestest

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DBHost     = "localhost"
	DBUser     = "postgres"
	DBPassword = "secret"
	DBName     = "session_manager"
	DBSSLMode  = "disable"
)

Variables

View Source
var ExpiryTime time.Time

ExpiryTime is the time used as "expiry" for the inserted data

Functions

func Start

func Start(ctx context.Context) (*pgxpool.Pool, nat.Port, func(ctx context.Context))

Start initialises a database instance and returns a connection pool, database port, and termination function.

Database credentials are available as exported variables. The database contains pre-defined test data. See INSERT statements in the prepareDB.

Types

This section is empty.

Jump to

Keyboard shortcuts

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