83df0ee1b0
1. Added KeyValueStore.Iterate for implementing the different List, ListV2 etc. implementations. This allows for more efficient use of memory depending on the situation. 2. Implemented an inmemory teststore for running tests. This should allow to replace MockKeyValueStore in most places. 3. Rewrote tests 4. Pulled out logger from bolt implementation so it can be used for all other storage implementations. 5. Fixed multiple things in bolt and redis implementations.
26 lines
480 B
Go
26 lines
480 B
Go
// Copyright (C) 2018 Storj Labs, Inc.
|
|
// See LICENSE for copying information.
|
|
|
|
package storelogger
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"storj.io/storj/storage/teststore"
|
|
"storj.io/storj/storage/testsuite"
|
|
|
|
"go.uber.org/zap"
|
|
)
|
|
|
|
func TestSuite(t *testing.T) {
|
|
store := teststore.New()
|
|
logged := New(zap.NewNop(), store)
|
|
testsuite.RunTests(t, logged)
|
|
}
|
|
|
|
func BenchmarkSuite(b *testing.B) {
|
|
store := teststore.New()
|
|
logged := New(zap.NewNop(), store)
|
|
testsuite.RunBenchmarks(b, logged)
|
|
}
|