diff --git a/beego.go b/beego.go index 9c34c9f9..1ee4c65f 100644 --- a/beego.go +++ b/beego.go @@ -336,7 +336,7 @@ func initBeforeHttpRun() { // this function is for test package init func TestBeegoInit(apppath string) { AppPath = apppath - RunMode = "test" + os.Setenv("BEEGO_RUNMODE", "test") AppConfigPath = filepath.Join(AppPath, "conf", "app.conf") err := ParseConfig() if err != nil && !os.IsNotExist(err) {