go-common/app/interface/live/app-room/dao/dao_test.go

22 lines
340 B
Go
Raw Normal View History

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