File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -235,7 +235,7 @@ func TestValidateFormType(t *testing.T) {
235
235
},
236
236
}
237
237
238
- t .Run ("TabledTests" , func (t * testing.T ) {
238
+ passed := t .Run ("TabledTests" , func (t * testing.T ) {
239
239
// TabledCases runs through all the manual test cases
240
240
for _ , c := range cases {
241
241
t .Run (c .name , func (t * testing.T ) {
@@ -251,6 +251,12 @@ func TestValidateFormType(t *testing.T) {
251
251
}
252
252
})
253
253
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
+
254
260
// AssumeErrorCases assumes any uncovered test will return an error.
255
261
// This ensures all valid test case paths are covered.
256
262
t .Run ("AssumeErrorCases" , func (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments