Documentation
¶
Overview ¶
Package storetest opens throw-away stores for tests. It imports "testing", so only test code imports it, never the program.
Index ¶
Constants ¶
const LargeDemoEnv = "CLOWDER_BENCH_DB"
LargeDemoEnv is the environment variable that names the database file of a large demo (`clowder demo -size large`, SPEC §10) for the benchmarks.
Variables ¶
This section is empty.
Functions ¶
func Open ¶
Open returns a Store on a new, empty database in a file of the test's temporary directory, migrated and using clk. Each call gets its own database, so tests do not see each other's rows, not even in parallel. The Store is closed when the test ends. A failure stops the test.
func OpenLarge ¶
OpenLarge opens a copy of the large demo database that LargeDemoEnv names, in the test's temporary directory, so that the benchmark never changes the original. It skips the test or benchmark with a message when the variable is not set, which keeps the benchmarks out of the default test run. The Store is closed when the test ends. A failure stops the test.
Types ¶
This section is empty.