prysm-pulse/beacon-chain/db/kv/kv_test.go
Raul Jordan 36b6a71af4
Configurable DB Mmap Size for Beacon Node and Validator Client (#8448)
* add flag to beacon and validator

* gaz

* fuzz

* add dep viz

* add to tools
2021-02-15 20:29:47 +00:00

19 lines
415 B
Go

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