go-common/app/job/main/dm/dao/dao_test.go

25 lines
342 B
Go
Raw Normal View History

2019-04-22 10:49:16 +00:00
package dao
import (
"os"
"testing"
"go-common/app/job/main/dm/conf"
"go-common/library/log"
)
var (
testDao *Dao
)
func TestMain(m *testing.M) {
conf.ConfPath = "../cmd/dm-job-test.toml"
if err := conf.Init(); err != nil {
panic(err)
}
log.Init(conf.Conf.Xlog)
defer log.Close()
testDao = New(conf.Conf)
os.Exit(m.Run())
}