Пример #1
0
func TestMain(m *testing.M) {
	config.ReadCfg("./config.json")

	deferinit.InitAll()
	go runServer()

	cleanDatabase()

	prepareUserData()
	code := m.Run()

	//cleanDatabase()

	// 清理redis,生成环境下慎用!!!
	//FlushAll()
	os.Exit(code)
}
Пример #2
0
func main() {
	config.ReadCfg("./config.json")
	setGlobalVars()
	deferinit.InitAll()
	runServer()
}