Skip to content

Commit 5784e58

Browse files
committed
Use Fatalf for non-recoverable errors in test
1 parent 5f1c7ae commit 5784e58

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

staging/src/k8s.io/client-go/testing/fixture_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ func TestApplyCreate(t *testing.T) {
294294
handled, configMap, err := reaction(action)
295295
assert.True(t, handled)
296296
if err != nil {
297-
t.Errorf("Failed to create a resource with apply: %v", err)
297+
t.Fatalf("Failed to create a resource with apply: %v", err)
298298
}
299299
cm := configMap.(*v1.ConfigMap)
300300
assert.Equal(t, cm.Data, map[string]string{"k": "v"})
@@ -314,7 +314,7 @@ func TestApplyNoMeta(t *testing.T) {
314314
handled, configMap, err := reaction(action)
315315
assert.True(t, handled)
316316
if err != nil {
317-
t.Errorf("Failed to create a resource with apply: %v", err)
317+
t.Fatalf("Failed to create a resource with apply: %v", err)
318318
}
319319
cm := configMap.(*v1.ConfigMap)
320320
assert.Equal(t, "cm-1", cm.Name)

0 commit comments

Comments
 (0)