sqltest

package
v0.0.0-...-7d312d8 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCockroachDBForTests

func NewCockroachDBForTests(t *testing.T, databaseNamePrefix string) pool.Pool

NewCockroachDBForTests creates a new temporary CockroachDB database with all the Schema applied for testing. It also returns a function to call to clean up the database after the tests have completed.

We pass in a database name prefix so that different tests work in different databases, even though they may be in the same CockroachDB instance, so that if a test fails it doesn't leave the database in a bad state for a subsequent test. A random number will be appended to the database name prefix.

Types

This section is empty.

Jump to

Keyboard shortcuts

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