Documentation
¶
Overview ¶
Package dbtest contains tests for DBs. Implementation under test is pluggable.
Index ¶
- func TestDelete(t *testing.T, dbFn func(kvs []*VersionedKV, clock Clock) (DB, error))
- func TestGet(t *testing.T, oldValue, newValue Value, ...)
- func TestHistory(t *testing.T, dbFn func(kvs []*VersionedKV) (DB, error))
- func TestList(t *testing.T, dbFn func(kvs []*VersionedKV) (DB, error))
- func TestSet(t *testing.T, dbFn func(kvs []*VersionedKV, clock Clock) (DB, error))
- type TestClock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TestDelete ¶
TestDelete tests the Delete function. dbFn must return a DB under test with the VersionedKV's stored in the database and transaction times provided by the clock.
func TestGet ¶
func TestGet(t *testing.T, oldValue, newValue Value, dbFn func(kvs []*VersionedKV) (db DB, closeFn func(), err error))
TestGet tests the Get function. dbFn must return a DB under test with the VersionedKV's stored in the database and a function to close the DB after the test is complete.
func TestHistory ¶
TestHistory tests the History function. dbFn must return a DB under test with the VersionedKV's stored in the database.
Types ¶
Click to show internal directories.
Click to hide internal directories.