fix: testcase compatibility in the worker

This commit is contained in:
徐聪
2022-07-29 19:57:05 +08:00
parent ed145c6428
commit 22ef887311
3 changed files with 27 additions and 24 deletions

View File

@@ -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 {