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 ¶
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.