update the default test file `tests/default_test.go`

This commit is contained in:
Jeffrey Wu 2018-11-23 16:17:11 +08:00
parent e3e401cadd
commit 0e342ff4c1
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
}