This commit is contained in:
Jeffrey Wu 2018-11-23 08:26:05 +00:00 committed by GitHub
commit 7ec44ec13d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -511,9 +511,9 @@ import (
)
func init() {
_, file, _, _ := runtime.Caller(1)
apppath, _ := filepath.Abs(filepath.Dir(filepath.Join(file, ".." + string(filepath.Separator))))
beego.TestBeegoInit(apppath)
appPath, _ := filepath.Abs("..")
beego.TestBeegoInit(appPath)
beego.AppPath = appPath
}
// TestGet is a sample to run an endpoint test

View File

@ -101,9 +101,9 @@ import (
)
func init() {
_, file, _, _ := runtime.Caller(1)
apppath, _ := filepath.Abs(filepath.Dir(filepath.Join(file, ".." + string(filepath.Separator))))
beego.TestBeegoInit(apppath)
appPath, _ := filepath.Abs("..")
beego.TestBeegoInit(appPath)
beego.AppPath = appPath
}