-
Notifications
You must be signed in to change notification settings - Fork 303
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
Refactor l4_test assertInternalLbResourcesDeleted function #1805
Refactor l4_test assertInternalLbResourcesDeleted function #1805
Conversation
/assign cezarygerard |
d82032a
to
7ee7b9d
Compare
pkg/loadbalancers/l4_test.go
Outdated
t.Errorf("verifyHealthCheckNotExists(_, %s)", hcNameShared) | ||
} | ||
|
||
hcNameNonShared := l4.namer.L4HealthCheck(l4.Service.Namespace, l4.Service.Name, true) |
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.
last arg should be false
or better:
last arg should be named variable
or event better
L4ResourcesNamer interface should have 2 methods, with no bool arg
- L4SharedHealthCheck
- L4NonSharedHealthCheck
also currently make test
passes so it means the tests are rather poor :-/
maybe create and delete ilb service with externaltrafficpolicy:local ?
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.
Thank you for catching this, fixed
I agree about namer, but I don't think it should be changed in this PR
make test
passes, but it is hard to imagine them to fall in this "typo" case, even in perfect scenario, cause we just checking twice that sharedHC was deleted
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.
make test passes, but it is hard to imagine them to fall in this "typo" case, even in perfect scenario, cause we just checking twice that sharedHC was deleted
right, you would need to fix the the test AND break the actual controller logic, to see the test fail :-/
NVM
7ee7b9d
to
ebc0eab
Compare
Slavik, please add proper description to this PR |
@cezarygerard thank you, done |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cezarygerard, panslava The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Split assertInternalLbResourcesDeleted function in l4_test to smaller functions which separately check that forwarding rule, health check, firewall etc were deleted