neoneo-go/pkg/core/storage/boltdb_store_test.go

17 lines
324 B
Go
Raw Normal View History

2019-09-14 07:29:08 +00:00
package storage
import (
"path"
2019-09-14 07:29:08 +00:00
"testing"
"github.com/stretchr/testify/require"
)
func newBoltStoreForTesting(t testing.TB) Store {
d := t.TempDir()
testFileName := path.Join(d, "test_bolt_db")
boltDBStore, err := NewBoltDBStore(BoltDBOptions{FilePath: testFileName})
2019-09-14 07:29:08 +00:00
require.NoError(t, err)
return boltDBStore
}