Documentation
¶
Overview ¶
Package testkit opens the metadata store selected by DRIVESYNC_STORE. The default is sqlite. postgres starts one embedded Postgres per process and gives each test its own schema.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OpenEnginePair ¶
func OpenEnginePair(t testing.TB) (EngineStore, EngineStore)
OpenEnginePair returns two stores on one database. SQLite shares a file. Postgres shares a schema, so each store is its own authority process view.
func OpenPublic ¶
OpenPublic opens the public metadata store for this test.
Types ¶
type EngineStore ¶
type EngineStore interface {
Transaction(context.Context, func(*engine.Metadata) error) error
Close() error
}
EngineStore is the private metadata store tests share across backends.
func OpenEngine ¶
func OpenEngine(t testing.TB) EngineStore
OpenEngine opens the engine store for this test and closes it on cleanup.
Click to show internal directories.
Click to hide internal directories.