mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 07:10:55 +00:00
Change set test mode way
This commit is contained in:
parent
245664010c
commit
fa7416452e
6
beego.go
6
beego.go
@ -85,9 +85,11 @@ func initBeforeHTTPRun() {
|
||||
|
||||
// TestBeegoInit is for test package init
|
||||
func TestBeegoInit(ap string) {
|
||||
os.Setenv("BEEGO_RUNMODE", "test")
|
||||
appConfigPath = filepath.Join(ap, "conf", "app.conf")
|
||||
os.Chdir(ap)
|
||||
LoadAppConfig(appConfigProvider, appConfigPath)
|
||||
if err := LoadAppConfig(appConfigProvider, appConfigPath); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
BConfig.RunMode = "test"
|
||||
initBeforeHTTPRun()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user