forked from TrueCloudLab/neoneo-go
9987afea4c
Lightweight thing to import anywhere, pkg/config should not be dependent on Level/Bolt/anything else.
17 lines
403 B
Go
17 lines
403 B
Go
package storage
|
|
|
|
import (
|
|
"path/filepath"
|
|
"testing"
|
|
|
|
"github.com/nspcc-dev/neo-go/pkg/core/storage/dbconfig"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func newBoltStoreForTesting(t testing.TB) Store {
|
|
d := t.TempDir()
|
|
testFileName := filepath.Join(d, "test_bolt_db")
|
|
boltDBStore, err := NewBoltDBStore(dbconfig.BoltDBOptions{FilePath: testFileName})
|
|
require.NoError(t, err)
|
|
return boltDBStore
|
|
}
|