Commit 879f8e0c authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

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.
parents 4d8ffb23 824f466f
...@@ -1012,7 +1012,7 @@ func TestServiceRegistryExternalTrafficBetaAnnotationHealthCheckNodePortUserAllo ...@@ -1012,7 +1012,7 @@ func TestServiceRegistryExternalTrafficBetaAnnotationHealthCheckNodePortUserAllo
} }
created_svc, err := storage.Create(ctx, svc) created_svc, err := storage.Create(ctx, svc)
if created_svc == nil || err != nil { 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) created_service := created_svc.(*api.Service)
if !service.NeedsHealthCheck(created_service) { if !service.NeedsHealthCheck(created_service) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment