go-common/app/interface/main/creative/service/newcomer/service_test.go

27 lines
414 B
Go
Raw Normal View History

2019-04-22 10:49:16 +00:00
package newcomer
import (
"flag"
"os"
"testing"
"go-common/app/interface/main/creative/conf"
"go-common/app/interface/main/creative/service"
)
var (
s *Service
)
func TestMain(m *testing.M) {
flag.Set("conf", "../../cmd/creative.toml")
flag.Parse()
if err := conf.Init(); err != nil {
panic(err)
}
rpcdaos := service.NewRPCDaos(conf.Conf)
s = New(conf.Conf, rpcdaos)
m.Run()
os.Exit(m.Run())
}