🚚 Moved bolt testing util to testing/bolttest package

This commit is contained in:
Maxim Lebedev 2021-12-28 06:06:31 +05:00
parent 76eeab15be
commit b3490f912e
Signed by: toby3d
GPG Key ID: 1F14E25B7C119FC5
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
package util
package bolttest
import (
"os"
@ -9,9 +9,9 @@ import (
bolt "go.etcd.io/bbolt"
)
// TestBolt returns a temporary empty database bbolt in the temporary directory
// New returns a temporary empty database bbolt in the temporary directory
// with the cleanup function.
func TestBolt(tb testing.TB) (*bolt.DB, func()) {
func New(tb testing.TB) (*bolt.DB, func()) {
tb.Helper()
f, err := os.CreateTemp(os.TempDir(), "bbolt_*.db")