Conversation
ad44fc9 to
39554f1
Compare
pkg/loadbalancers/l4_test.go
Outdated
| t.Fatalf("Error ensuring service err: %v", result.Error) | ||
| } | ||
| svc2, l4, result := ensureService(fakeGCE, namer, nodeNames, vals.ZoneName, 8081, t) | ||
| svc2, l4, result := ensureService(fakeGCE, namer, nodeNames, vals.ZoneName, t) |
There was a problem hiding this comment.
Is it working as intended? Do we expect here 2 different services or ensure twice the same service?
There was a problem hiding this comment.
I agree this test is confusing
I deleted port from ensureService argument, because it was not used inside
Feels like creating 2 services here is not needed, all the test logic relies on
(fakeGCE.Compute().(*cloud.MockGCE)).MockHealthChecks.DeleteHook = test.DeleteHealthCheckResourceInUseErrorHook
So, I deleted second service creation and left only one service
- Split l4netlb_test assertions by functions - Move common l4_test, l4netlb_test assertions to l4testutils
39554f1 to
51039da
Compare
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kl52752, panslava The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This will also make it easier to add dual-stack tests to l4netlb in the future
/assign @kl52752