sqlitetest

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package sqlitetest gives tests a new dockhand database without each running every migration: a fresh database takes the schema's whole history, about fifty migrations, each in its own transaction synced to the disk, and hundreds of tests open one. Only tests import it.

The store's own tests of opening and migrating, its guards among them, open a new file with sqlite.Open as ever; a test that is about what a first open does does so too.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fresh

func Fresh(t testing.TB, path string) string

Fresh writes at path, making its directory, a database at this build's schema that holds nothing, as sqlite.Open makes a new one, and returns path. The test binary migrates one database the first time it's asked, in a temporary directory it then removes, and each call copies it, so opening the copy migrates nothing.

Types

This section is empty.

Jump to

Keyboard shortcuts

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