refactor: NewConfig

This commit is contained in:
debugtalk
2021-12-07 13:29:06 +08:00
parent b8573c2ea9
commit d31c30476f
14 changed files with 88 additions and 86 deletions

View File

@@ -86,7 +86,7 @@ func (h *HAR) makeTestCase() (*hrp.TCase, error) {
}
tCase := &hrp.TCase{
Config: *h.prepareConfig(),
Config: h.prepareConfig(),
TestSteps: teststeps,
}
return tCase, nil
@@ -114,11 +114,8 @@ func (h *HAR) load() (*Har, error) {
}
func (h *HAR) prepareConfig() *hrp.TConfig {
return &hrp.TConfig{
Name: "testcase description",
Variables: make(map[string]interface{}),
Verify: false,
}
return hrp.NewConfig("testcase description").
SetVerifySSL(false)
}
func (h *HAR) prepareTestSteps() ([]*hrp.TStep, error) {