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

21 lines
401 B
Go
Raw Normal View History

package storage
import (
"testing"
"github.com/stretchr/testify/require"
)
func newBadgerDBForTesting(t *testing.T) Store {
bdbDir := t.TempDir()
dbConfig := DBConfiguration{
Type: "badgerdb",
BadgerDBOptions: BadgerDBOptions{
Dir: bdbDir,
},
}
newBadgerStore, err := NewBadgerDBStore(dbConfig.BadgerDBOptions)
require.Nil(t, err, "NewBadgerDBStore error")
return newBadgerStore
}