Merge pull request #42182 from spxtr/fatalunit

Automatic merge from submit-queue

Change an Errorf to a Fatalf to prevent a panic.

In #37982 we see that if this error is hit then we will panic on the next line. Lets use `Fatalf` where appropriate :)

This does *not* fix the flake, since that's caused by the test assuming that a particular port is free.
This commit is contained in:
Kubernetes Submit Queue 2017-04-04 12:14:21 -07:00 committed by GitHub
commit 879f8e0c9c

View File

@ -1012,7 +1012,7 @@ func TestServiceRegistryExternalTrafficBetaAnnotationHealthCheckNodePortUserAllo
}
created_svc, err := storage.Create(ctx, svc)
if created_svc == nil || err != nil {
t.Errorf("Unexpected failure creating service %v", err)
t.Fatalf("Unexpected failure creating service: %v", err)
}
created_service := created_svc.(*api.Service)
if !service.NeedsHealthCheck(created_service) {