package storagetest
import "github.com/google/trillian/integration/storagetest"
Package storagetest verifies that storage interfaces behave correctly
Index ¶
- func RunMapStorageTests(t *testing.T, storageFactory MapStorageFactory)
- type MapStorageFactory
- type MapStorageTest
- type MapTests
Functions ¶
func RunMapStorageTests ¶
func RunMapStorageTests(t *testing.T, storageFactory MapStorageFactory)
RunMapStorageTests runs all the map storage tests against the provided map storage implementation.
Types ¶
type MapStorageFactory ¶
type MapStorageFactory func(ctx context.Context, t *testing.T) (storage.MapStorage, storage.AdminStorage)
MapStorageFactory creates MapStorage and AdminStorage for a test to use.
type MapStorageTest ¶
type MapStorageTest func(ctx context.Context, t *testing.T, s storage.MapStorage, as storage.AdminStorage)
MapStorageTest executes a test using the given storage implementations.
type MapTests ¶
type MapTests struct{}
MapTests is a suite of tests to run against the storage.MapTest interface.
func (*MapTests) TestCheckDatabaseAccessible ¶
func (*MapTests) TestCheckDatabaseAccessible(ctx context.Context, t *testing.T, s storage.MapStorage, _ storage.AdminStorage)
TestCheckDatabaseAccessible fails the test if the map storage is not accessible.
func (*MapTests) TestMapSnapshot ¶
func (*MapTests) TestMapSnapshot(ctx context.Context, t *testing.T, s storage.MapStorage, as storage.AdminStorage)
TestMapSnapshot fails the test if MapStorage.SnapshotForTree() does not behave correctly.
Source Files ¶
maphelpers.go maptestrunner.go maptests.go treehelpers.go
- Version
- v1.3.6
- Published
- Jan 9, 2020
- Platform
- js/wasm
- Imports
- 11 packages
- Last checked
- 4 hours ago –
Tools for package owners.