- refactor test init flow

This commit is contained in:
gazebo
2019-03-20 22:28:51 +08:00
parent 120e0dde6c
commit 15c703b469
17 changed files with 76 additions and 129 deletions

View File

@@ -4,9 +4,7 @@ import (
"testing"
"git.rosy.net.cn/jx-callback/business/jxutils/cache"
"git.rosy.net.cn/jx-callback/globals"
"git.rosy.net.cn/jx-callback/globals/beegodb"
"github.com/astaxie/beego"
"git.rosy.net.cn/jx-callback/globals/testinit0"
)
var (
@@ -14,15 +12,7 @@ var (
)
func init() {
//E:/goprojects/src/git.rosy.net.cn/jx-callback/conf/app.conf
///Users/xujianhua/go/src/git.rosy.net.cn/jx-callback/conf/app.conf
beego.InitBeegoBeforeTest("/Users/xujianhua/go/src/git.rosy.net.cn/jx-callback/conf/app.conf")
beego.BConfig.RunMode = "dev" // InitBeegoBeforeTest会将runmode设置为test
globals.Init()
beegodb.Init()
// api.Init()
testinit0.Init()
cacher = New("localhost", 6379, "")
}