-
Notifications
You must be signed in to change notification settings - Fork 38.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
more e2eservice.TestJig cleanups #83549
Changes from all commits
85ebedd
4dcc622
a0ad420
52b3664
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -841,17 +841,18 @@ func (cont *NginxIngressController) Init() { | |
// --publish-service flag (see <IngressManifestPath>/nginx/rc.yaml) to make it work in private | ||
// clusters, i.e. clusters where nodes don't have public IPs. | ||
framework.Logf("Creating load balancer service for nginx ingress controller") | ||
serviceJig := e2eservice.NewTestJig(cont.Client, "nginx-ingress-lb") | ||
serviceJig.CreateTCPServiceOrFail(cont.Ns, func(svc *v1.Service) { | ||
serviceJig := e2eservice.NewTestJig(cont.Client, cont.Ns, "nginx-ingress-lb") | ||
_, err := serviceJig.CreateTCPService(func(svc *v1.Service) { | ||
svc.Spec.Type = v1.ServiceTypeLoadBalancer | ||
svc.Spec.Selector = map[string]string{"k8s-app": "nginx-ingress-lb"} | ||
svc.Spec.Ports = []v1.ServicePort{ | ||
{Name: "http", Port: 80}, | ||
{Name: "https", Port: 443}, | ||
{Name: "stats", Port: 18080}} | ||
}) | ||
cont.lbSvc = serviceJig.WaitForLoadBalancerOrFail(cont.Ns, "nginx-ingress-lb", e2eservice.GetServiceLoadBalancerCreationTimeout(cont.Client)) | ||
serviceJig.SanityCheckService(cont.lbSvc, v1.ServiceTypeLoadBalancer) | ||
framework.ExpectNoError(err) | ||
cont.lbSvc, err = serviceJig.WaitForLoadBalancer(e2eservice.GetServiceLoadBalancerCreationTimeout(cont.Client)) | ||
framework.ExpectNoError(err) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here, please add an annotation, e.g., framework.ExpectNoError(err, "timed out waiting for load balancer") There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. likewise, the actual error would be |
||
|
||
read := func(file string) string { | ||
return string(testfiles.ReadOrDie(filepath.Join(IngressManifestPath, "nginx", file))) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: could you please add an annotation to the error assertion, for example:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error itself already says all of that though (
"failed to create TCP service 'nginx-ingress-lb': ..."
)...