beego: hot fix for TestBeegoInit can't parsefile
Showing
1 changed file
with
5 additions
and
0 deletions
| ... | @@ -238,6 +238,11 @@ func initBeforeHttpRun() { | ... | @@ -238,6 +238,11 @@ func initBeforeHttpRun() { |
| 238 | func TestBeegoInit(apppath string) { | 238 | func TestBeegoInit(apppath string) { |
| 239 | AppPath = apppath | 239 | AppPath = apppath |
| 240 | AppConfigPath = filepath.Join(AppPath, "conf", "app.conf") | 240 | AppConfigPath = filepath.Join(AppPath, "conf", "app.conf") |
| 241 | err := ParseConfig() | ||
| 242 | if err != nil && !os.IsNotExist(err) { | ||
| 243 | // for init if doesn't have app.conf will not panic | ||
| 244 | Info(err) | ||
| 245 | } | ||
| 241 | os.Chdir(AppPath) | 246 | os.Chdir(AppPath) |
| 242 | initBeforeHttpRun() | 247 | initBeforeHttpRun() |
| 243 | } | 248 | } | ... | ... |
-
Please register or sign in to post a comment