testutil

package
v0.68.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package testutil provides isolated tinySQL databases for Go tests and benchmarks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open(t testing.TB, fixtures ...string) *sql.DB

Open creates a private in-memory database, executes fixtures in order, and registers cleanup of both the SQL pool and its native database with t. Each fixture is one SQL statement. A setup or cleanup error fails the test. Each call is independent, including calls from parallel tests with identical names and schemas. Close query rows and transactions before test cleanup.

Types

This section is empty.

Jump to

Keyboard shortcuts

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