2019-09-14 07:29:08 +00:00
|
|
|
package storage
|
|
|
|
|
|
|
|
import (
|
2021-08-25 19:17:37 +00:00
|
|
|
"path"
|
2019-09-14 07:29:08 +00:00
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/stretchr/testify/require"
|
|
|
|
)
|
|
|
|
|
2021-10-05 12:13:19 +00:00
|
|
|
func newBoltStoreForTesting(t testing.TB) Store {
|
2021-08-25 19:17:37 +00:00
|
|
|
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
|
|
|
|
}
|