mirror of
https://github.com/httprunner/httprunner.git
synced 2026-07-07 23:41:22 +08:00
fix: testcase compatibility in the worker
This commit is contained in:
@@ -104,10 +104,6 @@ func (tc *TCase) ToTestCase(casePath string) (*TestCase, error) {
|
||||
return nil, errors.New("invalid testcase format, missing teststeps!")
|
||||
}
|
||||
|
||||
err := tc.MakeCompat()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if tc.Config == nil {
|
||||
tc.Config = &TConfig{Name: "please input testcase name"}
|
||||
}
|
||||
@@ -121,6 +117,11 @@ func (tc *TCase) toTestCase() (*TestCase, error) {
|
||||
Config: tc.Config,
|
||||
}
|
||||
|
||||
err := tc.MakeCompat()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// locate project root dir by plugin path
|
||||
projectRootDir, err := GetProjectRootDirPath(tc.Config.Path)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user