forked from TrueCloudLab/neoneo-go
6d074a96e9
Simplify things, drop TempFile at the same time (refs. #1764)
20 lines
401 B
Go
20 lines
401 B
Go
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
|
|
}
|