Skip to content

Commit bb00c25

Browse files
committed
cleanup output
1 parent 771be40 commit bb00c25

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

provider/formtype_test.go

+7-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ func TestValidateFormType(t *testing.T) {
235235
},
236236
}
237237

238-
t.Run("TabledTests", func(t *testing.T) {
238+
passed := t.Run("TabledTests", func(t *testing.T) {
239239
// TabledCases runs through all the manual test cases
240240
for _, c := range cases {
241241
t.Run(c.name, func(t *testing.T) {
@@ -251,6 +251,12 @@ func TestValidateFormType(t *testing.T) {
251251
}
252252
})
253253

254+
if !passed {
255+
// Do not run additional tests and pollute the output
256+
t.Log("Tests failed, will not run the assumed error cases")
257+
return
258+
}
259+
254260
// AssumeErrorCases assumes any uncovered test will return an error.
255261
// This ensures all valid test case paths are covered.
256262
t.Run("AssumeErrorCases", func(t *testing.T) {

0 commit comments

Comments
 (0)