From 64d4f6518b4558cd1c10a591705ba9ea6471dbd6 Mon Sep 17 00:00:00 2001 From: astaxie Date: Sun, 14 Jun 2015 18:10:10 +0800 Subject: [PATCH] fix #1213 --- beego.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {