You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
383 B
24 lines
383 B
package bolt
|
|
|
|
import (
|
|
"fmt"
|
|
"github.com/gisle/stufflog/config"
|
|
"os"
|
|
"testing"
|
|
"time"
|
|
)
|
|
|
|
var db *Database
|
|
var dbErr error
|
|
|
|
func TestMain(m *testing.M) {
|
|
ns := time.Now().Nanosecond()
|
|
path := fmt.Sprintf("/tmp/stufflog_repos_test_%s_%d.db", time.Now().Format("20060102150405"), ns)
|
|
|
|
db, dbErr = Init(config.Database{
|
|
Driver: "bolt",
|
|
Path: path,
|
|
})
|
|
|
|
os.Exit(m.Run())
|
|
}
|