dbtest

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildRequest added in v0.6.6

func BuildRequest(method, url, body string) *http.Request

func Logger

func Logger() *zerolog.Logger

func StartContainerDatabase

func StartContainerDatabase(ctx context.Context, dbName string, t *testing.T, migrationsDirRelPath string) (db.Store, testcontainers.Container)

StartContainerDatabase starts postgres container with default test settings, and migrates the db. Caller must terminate container.

func TruncateTables

func TruncateTables(db *sql.DB, dbName string, t *testing.T)

TruncateTables truncates tables for the test db, useful to run as teardown at end of each DB dependent test.

Types

This section is empty.

Jump to

Keyboard shortcuts

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