refactor: NewConfig

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

View File

@@ -74,9 +74,7 @@ func TestRunRequestPostDataToStruct(t *testing.T) {
}
func TestRunRequestRun(t *testing.T) {
config := &TConfig{
BaseURL: "https://postman-echo.com",
}
config := NewConfig("test").SetBaseURL("https://postman-echo.com")
runner := NewRunner(t).SetDebug(true)
if _, err := runner.runStep(stepGET, config); err != nil {
t.Fatalf("tStep.Run() error: %s", err)