tu

package
v0.0.0-...-4cb7bb4 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package tu is the test utility for spinning up an isolated CockroachDB.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	DB *sql.DB
	// contains filtered or unexported fields
}

Context holds the test server and DB connection.

func Setup

func Setup() *Context

Setup starts a CockroachDB test server and runs the schema migration.

func (*Context) Ctx

func (c *Context) Ctx() context.Context

Ctx returns a context with the DB injected, the way pgctx.Middleware would.

func (*Context) Teardown

func (c *Context) Teardown()

Jump to

Keyboard shortcuts

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