Skip to content

Commit 39b5928

Browse files
committed
Add directory creation for BoltStore path
1 parent ed5de47 commit 39b5928

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

adapter/test_util.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,9 @@ func setupNodes(t *testing.T, ctx context.Context, n int, ports []portsAdress, c
263263

264264
for i := 0; i < n; i++ {
265265
rnd := uuid.New()
266-
st, err := store.NewBoltStore(filepath.Join(os.TempDir(), rnd.String(), "raft.db"))
266+
path := filepath.Join(os.TempDir(), rnd.String())
267+
require.NoError(t, os.Mkdir(path, 0755)) //nolint:mnd
268+
st, err := store.NewBoltStore(filepath.Join(path, "raft.db"))
267269
require.NoError(t, err)
268270
trxSt := store.NewMemoryStoreDefaultTTL()
269271
fsm := kv.NewKvFSM(st, trxSt)

0 commit comments

Comments
 (0)