testing

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package testing contains internal testing utilities we apply in go-dbkit.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeadlockTest

func DeadlockTest(t *testing.T, dialect dbkit.Dialect, checkDeadlockErr func(err error) bool)

DeadlockTest is internal function to simulate DB deadlock

func MustRunAndOpenTestDB

func MustRunAndOpenTestDB(ctx context.Context, dialect string) (db *sql.DB, stop func(ctx context.Context) error)

MustRunAndOpenTestDB creates a container with a test database and returns a connection to it.

func RunAndOpenTestDB

func RunAndOpenTestDB(ctx context.Context, dialect string) (db *sql.DB, stop func(ctx context.Context) error, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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