✅ Use temporary dir from *testing.T in bolttest
This commit is contained in:
parent
b85f97ecac
commit
8d7a6df6dc
|
@ -12,7 +12,7 @@ import (
|
||||||
func New(tb testing.TB) (*bolt.DB, func()) {
|
func New(tb testing.TB) (*bolt.DB, func()) {
|
||||||
tb.Helper()
|
tb.Helper()
|
||||||
|
|
||||||
tempFile, err := os.CreateTemp(os.TempDir(), "bbolt_*.db")
|
tempFile, err := os.CreateTemp(tb.TempDir(), "bbolt_*.db")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
tb.Fatal(err)
|
tb.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user