go-common/app/admin/ep/saga/dao/dao_test.go
2019-04-22 18:49:16 +08:00

25 lines
298 B
Go

package dao
import (
"flag"
"os"
"testing"
"go-common/app/admin/ep/saga/conf"
)
var (
d *Dao
)
func TestMain(m *testing.M) {
flag.Set("conf", "../cmd/saga-admin-test.toml")
flag.Parse()
if err := conf.Init(); err != nil {
panic(err)
}
d = New()
defer d.Close()
os.Exit(m.Run())
}