Use temporary dir from *testing.T in bolttest

This commit is contained in:
Maxim Lebedev 2024-05-06 17:38:59 +05:00
parent b85f97ecac
commit 8d7a6df6dc
Signed by: toby3d
GPG Key ID: 1F14E25B7C119FC5

View File

@ -12,7 +12,7 @@ import (
func New(tb testing.TB) (*bolt.DB, func()) {
tb.Helper()
tempFile, err := os.CreateTemp(os.TempDir(), "bbolt_*.db")
tempFile, err := os.CreateTemp(tb.TempDir(), "bbolt_*.db")
if err != nil {
tb.Fatal(err)
}