prysm-pulse/beacon-chain/db/slasherkv/kv_test.go
Nishant Das a9ccabf6c9
Remove Bolt Mmap Flag (#11236)
* remove mmap flag

* fix mmap

* fix all build

* gaz

* config

* fix
2022-08-17 12:22:41 +00:00

19 lines
406 B
Go

package slasherkv
import (
"context"
"testing"
"github.com/prysmaticlabs/prysm/v3/testing/require"
)
// setupDB instantiates and returns a Store instance.
func setupDB(t testing.TB) *Store {
db, err := NewKVStore(context.Background(), t.TempDir())
require.NoError(t, err, "Failed to instantiate DB")
t.Cleanup(func() {
require.NoError(t, db.Close(), "Failed to close database")
})
return db
}