refactor: relocate convert

This commit is contained in:
debugtalk
2022-04-23 23:56:47 +08:00
parent 5073308b03
commit 813284110e
8 changed files with 166 additions and 69 deletions

View File

@@ -203,7 +203,7 @@ func TestRunCaseWithRefAPI(t *testing.T) {
func TestLoadTestCases(t *testing.T) {
// load test cases from folder path
tc := TestCasePath("../examples/demo-with-py-plugin/testcases/")
testCases, err := loadTestCases(&tc)
testCases, err := LoadTestCases(&tc)
if !assert.Nil(t, err) {
t.Fatal()
}
@@ -213,7 +213,7 @@ func TestLoadTestCases(t *testing.T) {
// load test cases from folder path, including sub folders
tc = TestCasePath("../examples/demo-with-py-plugin/")
testCases, err = loadTestCases(&tc)
testCases, err = LoadTestCases(&tc)
if !assert.Nil(t, err) {
t.Fatal()
}
@@ -223,7 +223,7 @@ func TestLoadTestCases(t *testing.T) {
// load test cases from single file path
tc = demoTestCaseWithPluginJSONPath
testCases, err = loadTestCases(&tc)
testCases, err = LoadTestCases(&tc)
if !assert.Nil(t, err) {
t.Fatal()
}
@@ -235,7 +235,7 @@ func TestLoadTestCases(t *testing.T) {
testcase := &TestCase{
Config: NewConfig("TestCase").SetWeight(3),
}
testCases, err = loadTestCases(testcase)
testCases, err = LoadTestCases(testcase)
if !assert.Nil(t, err) {
t.Fatal()
}