change: relocate

This commit is contained in:
debugtalk
2021-12-08 14:19:26 +08:00
parent a301266227
commit f8cebaa5d1
2 changed files with 13 additions and 13 deletions

View File

@@ -10,16 +10,6 @@ import (
"gopkg.in/yaml.v3"
)
func (tc *TestCase) ToTCase() (*TCase, error) {
tCase := TCase{
Config: tc.Config.ToStruct(),
}
for _, step := range tc.TestSteps {
tCase.TestSteps = append(tCase.TestSteps, step.ToStruct())
}
return &tCase, nil
}
func (tc *TCase) Dump2JSON(path string) error {
path, err := filepath.Abs(path)
if err != nil {
@@ -133,6 +123,11 @@ func (tc *TCase) ToTestCase() (*TestCase, error) {
var ErrUnsupportedFileExt = fmt.Errorf("unsupported testcase file extension")
// TestCasePath implements ITestCase interface.
type TestCasePath struct {
Path string
}
func (path *TestCasePath) ToTestCase() (*TestCase, error) {
var tc *TCase
var err error