Beispiel #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)
}
Beispiel #2
0
func main() {
	config.ReadCfg("./config.json")
	setGlobalVars()
	deferinit.InitAll()
	runServer()
}