diff --git a/beego.go b/beego.go index 65dd79cb..16601ecc 100644 --- a/beego.go +++ b/beego.go @@ -89,5 +89,6 @@ func TestBeegoInit(ap string) { os.Setenv("BEEGO_RUNMODE", "test") appConfigPath = filepath.Join(ap, "conf", "app.conf") os.Chdir(ap) + LoadAppConfig(appConfigProvider, appConfigPath) initBeforeHTTPRun() } diff --git a/config.go b/config.go index 15d11386..f0316a62 100644 --- a/config.go +++ b/config.go @@ -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