change: convert case compatiblity

This commit is contained in:
lilong.129
2024-11-09 23:21:51 +08:00
parent a76e8b9a90
commit 7cac7742d2
8 changed files with 186 additions and 175 deletions

View File

@@ -111,7 +111,7 @@ func LoadCurlCase(path string) (*hrp.TestCaseDef, error) {
}
tCase.Steps = append(tCase.Steps, tSteps...)
}
err = tCase.MakeCompat()
err = hrp.ConvertCaseCompatibility(tCase)
if err != nil {
return nil, err
}

View File

@@ -391,7 +391,7 @@ func (c *CaseHar) ToTestCase() (*hrp.TestCaseDef, error) {
Config: c.prepareConfig(),
Steps: teststeps,
}
err = tCase.MakeCompat()
err = hrp.ConvertCaseCompatibility(tCase)
if err != nil {
return nil, err
}

View File

@@ -19,7 +19,7 @@ func LoadJSONCase(path string) (*hrp.TestCaseDef, error) {
return nil, errors.New("invalid json case file, missing teststeps")
}
err = caseJSON.MakeCompat()
err = hrp.ConvertCaseCompatibility(caseJSON)
if err != nil {
return nil, err
}

View File

@@ -144,7 +144,7 @@ func (c *CasePostman) ToTestCase() (*hrp.TestCaseDef, error) {
Config: c.prepareConfig(),
Steps: teststeps,
}
err = tCase.MakeCompat()
err = hrp.ConvertCaseCompatibility(tCase)
if err != nil {
return nil, err
}

View File

@@ -19,7 +19,7 @@ func LoadYAMLCase(path string) (*hrp.TestCaseDef, error) {
return nil, errors.New("invalid yaml file")
}
err = caseJSON.MakeCompat()
err = hrp.ConvertCaseCompatibility(caseJSON)
if err != nil {
return nil, err
}