Documentation ¶
Index ¶
- func CreateTestData(t *testing.T, db statedb.VersionedDB, ns string, numKeys int) []string
- func TestApplyUpdatesWithNilHeight(t *testing.T, dbProvider statedb.VersionedDBProvider)
- func TestBasicRW(t *testing.T, dbProvider statedb.VersionedDBProvider)
- func TestBatchWithIndividualRetry(t *testing.T, dbProvider statedb.VersionedDBProvider)
- func TestDataExportImport(t *testing.T, dbProvider statedb.VersionedDBProvider)
- func TestDeletes(t *testing.T, dbProvider statedb.VersionedDBProvider)
- func TestDrop(t *testing.T, dbProvider statedb.VersionedDBProvider, ...)
- func TestGetStateMultipleKeys(t *testing.T, dbProvider statedb.VersionedDBProvider)
- func TestGetVersion(t *testing.T, dbProvider statedb.VersionedDBProvider)
- func TestIterator(t *testing.T, dbProvider statedb.VersionedDBProvider)
- func TestItrWithoutClose(t *testing.T, itr statedb.ResultsIterator, expectedKeys []string)
- func TestMultiDBBasicRW(t *testing.T, dbProvider statedb.VersionedDBProvider)
- func TestPaginatedRangeQuery(t *testing.T, dbProvider statedb.VersionedDBProvider)
- func TestQuery(t *testing.T, dbProvider statedb.VersionedDBProvider)
- func TestRangeQuerySpecialCharacters(t *testing.T, dbProvider statedb.VersionedDBProvider)
- func TestSmallBatchSize(t *testing.T, dbProvider statedb.VersionedDBProvider)
- func TestValueAndMetadataWrites(t *testing.T, dbProvider statedb.VersionedDBProvider)
- type CheckDBsAfterDropFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTestData ¶
CreateTestData creates test data for the given namespace and number of keys.
func TestApplyUpdatesWithNilHeight ¶
func TestApplyUpdatesWithNilHeight(t *testing.T, dbProvider statedb.VersionedDBProvider)
TestApplyUpdatesWithNilHeight is a common test that is invoked by leveldb and couchdb for verifying that the statedb commits the batch with a nil height (used for committing the missing private data for the old blocks)
func TestBasicRW ¶
func TestBasicRW(t *testing.T, dbProvider statedb.VersionedDBProvider)
TestBasicRW tests basic read-write
func TestBatchWithIndividualRetry ¶
func TestBatchWithIndividualRetry(t *testing.T, dbProvider statedb.VersionedDBProvider)
TestBatchWithIndividualRetry tests a single failure in a batch
func TestDataExportImport ¶
func TestDataExportImport( t *testing.T, dbProvider statedb.VersionedDBProvider, )
TestDataExportImport is a common test that is invoked by leveldb and couchdb for testing the export and import of statedb for snapshotting functionality
func TestDeletes ¶
func TestDeletes(t *testing.T, dbProvider statedb.VersionedDBProvider)
TestDeletes tests deletes
func TestDrop ¶
func TestDrop(t *testing.T, dbProvider statedb.VersionedDBProvider, checkDBsAfterDropFunc CheckDBsAfterDropFunc)
TestDrop tests dropping channel-specific ledger data
func TestGetStateMultipleKeys ¶
func TestGetStateMultipleKeys(t *testing.T, dbProvider statedb.VersionedDBProvider)
TestGetStateMultipleKeys tests read for given multiple keys
func TestGetVersion ¶
func TestGetVersion(t *testing.T, dbProvider statedb.VersionedDBProvider)
TestGetVersion tests retrieving the version by namespace and key
func TestIterator ¶
func TestIterator(t *testing.T, dbProvider statedb.VersionedDBProvider)
TestIterator tests the iterator
func TestItrWithoutClose ¶
func TestItrWithoutClose(t *testing.T, itr statedb.ResultsIterator, expectedKeys []string)
TestItrWithoutClose verifies an iterator contains expected keys
func TestMultiDBBasicRW ¶
func TestMultiDBBasicRW(t *testing.T, dbProvider statedb.VersionedDBProvider)
TestMultiDBBasicRW tests basic read-write on multiple dbs
func TestPaginatedRangeQuery ¶
func TestPaginatedRangeQuery(t *testing.T, dbProvider statedb.VersionedDBProvider)
TestPaginatedRangeQuery tests range queries with pagination
func TestQuery ¶
func TestQuery(t *testing.T, dbProvider statedb.VersionedDBProvider)
TestQuery tests queries
func TestRangeQuerySpecialCharacters ¶
func TestRangeQuerySpecialCharacters(t *testing.T, dbProvider statedb.VersionedDBProvider)
TestRangeQuerySpecialCharacters tests range queries for keys with special characters and/or non-English characters
func TestSmallBatchSize ¶
func TestSmallBatchSize(t *testing.T, dbProvider statedb.VersionedDBProvider)
TestSmallBatchSize tests multiple update batches
func TestValueAndMetadataWrites ¶
func TestValueAndMetadataWrites(t *testing.T, dbProvider statedb.VersionedDBProvider)
TestValueAndMetadataWrites tests statedb for value and metadata read-writes
Types ¶
type CheckDBsAfterDropFunc ¶
type CheckDBsAfterDropFunc func(channelName string)
CheckDBsAfterDropFunc checks if the channel-specific dbs have been dropped