tests

package
v0.0.0-...-fb96a0c Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DbName = "test_db"
	DbUser = "test_user"
	DbPass = "test_password"
)

Variables

This section is empty.

Functions

func GetFreeTCPPort

func GetFreeTCPPort(t *testing.T) (port int, err error)

GetFreeTCPPort asks the kernel for a free open port that is ready to use.

func WaitUntilBusyPort

func WaitUntilBusyPort(port int, t *testing.T)

WaitUntilBusyPort blocks until port is in use

Types

type TestDatabase

type TestDatabase struct {
	DbInstance *pgxpool.Pool
	DbAddress  string
	// contains filtered or unexported fields
}

func SetupTestDatabase

func SetupTestDatabase() *TestDatabase

func (*TestDatabase) TearDown

func (tdb *TestDatabase) TearDown()

Jump to

Keyboard shortcuts

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