package storagetest
import "github.com/google/trillian/integration/storagetest"
Package storagetest verifies that storage interfaces behave correctly
Index ¶
- func RunLogStorageTests(t *testing.T, storageFactory LogStorageFactory)
- func RunMapStorageTests(t *testing.T, storageFactory MapStorageFactory)
- type LogStorageFactory
- type LogStorageTest
- type MapStorageFactory
- type MapStorageTest
- type MapTests
Functions ¶
func RunLogStorageTests ¶
func RunLogStorageTests(t *testing.T, storageFactory LogStorageFactory)
RunLogStorageTests runs all the log storage tests against the provided log storage implementation.
func RunMapStorageTests ¶
func RunMapStorageTests(t *testing.T, storageFactory MapStorageFactory)
RunMapStorageTests runs all the map storage tests against the provided map storage implementation.
Types ¶
type LogStorageFactory ¶
type LogStorageFactory = func(ctx context.Context, t *testing.T) (storage.LogStorage, storage.AdminStorage)
LogStorageFactory creates LogStorage and AdminStorage for a test to use.
type LogStorageTest ¶
type LogStorageTest = func(ctx context.Context, t *testing.T, s storage.LogStorage, as storage.AdminStorage)
LogStorageTest executes a test using the given storage implementations.
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 ¶
loghelpers.go logtests.go maphelpers.go maptests.go testrunner.go treehelpers.go
- Version
- v1.3.9
- Published
- Jun 22, 2020
- Platform
- js/wasm
- Imports
- 15 packages
- Last checked
- 7 minutes ago –
Tools for package owners.