mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-27 21:57:16 +00:00
19 lines
404 B
Go
19 lines
404 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())
|
|
require.NoError(t, err, "Failed to instantiate DB")
|
|
t.Cleanup(func() {
|
|
require.NoError(t, db.Close(), "Failed to close database")
|
|
})
|
|
return db
|
|
}
|