1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 07:50:54 +00:00

fix issue1789: when testing, load config explicitly and forcibly

This commit is contained in:
youngsterxyf 2016-03-14 11:26:26 +08:00
parent d90195061f
commit 549a39c478
2 changed files with 1 additions and 4 deletions

View File

@ -87,5 +87,6 @@ func TestBeegoInit(ap string) {
os.Setenv("BEEGO_RUNMODE", "test")
appConfigPath = filepath.Join(ap, "conf", "app.conf")
os.Chdir(ap)
LoadAppConfig(appConfigProvider, appConfigPath)
initBeforeHTTPRun()
}

View File

@ -316,10 +316,6 @@ func LoadAppConfig(adapterName, configPath string) error {
return fmt.Errorf("the target config file: %s don't exist", configPath)
}
if absConfigPath == appConfigPath {
return nil
}
appConfigPath = absConfigPath
appConfigProvider = adapterName