fix: unittest with failfast

This commit is contained in:
debugtalk
2022-04-16 00:36:38 +08:00
parent fe2c2f170e
commit 8ebb3634fb
14 changed files with 154 additions and 147 deletions

View File

@@ -24,11 +24,11 @@ func TestSearchJmespath(t *testing.T) {
resp.Body = io.NopCloser(strings.NewReader(testText))
respObj, err := newResponseObject(t, newParser(), &resp)
if err != nil {
t.Fail()
t.Fatal()
}
for _, data := range testData {
if !assert.Equal(t, data.expected, respObj.searchJmespath(data.raw)) {
t.Fail()
t.Fatal()
}
}
}
@@ -49,11 +49,11 @@ func TestSearchRegexp(t *testing.T) {
resp.Body = io.NopCloser(strings.NewReader(testText))
respObj, err := newResponseObject(t, newParser(), &resp)
if err != nil {
t.Fail()
t.Fatal()
}
for _, data := range testData {
if !assert.Equal(t, data.expected, respObj.searchRegexp(data.raw)) {
t.Fail()
t.Fatal()
}
}
}