- refactor test init flow
This commit is contained in:
14
business/jxutils/cache/redis/redis_test.go
vendored
14
business/jxutils/cache/redis/redis_test.go
vendored
@@ -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, "")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user