-
Notifications
You must be signed in to change notification settings - Fork 68
Adding more unit tests for remove-clusters #158
Adding more unit tests for remove-clusters #158
Conversation
I looked at the non *_test.go files so far have a few questions about that. Reviewed 5 of 8 files at r1. app/kubemci/pkg/gcp/backendservice/fake_backendservicesyncer.go, line 85 at r1 (raw file):
Can v.IGLinks have duplicates? If not, then this code doesn't look like it does anything. app/kubemci/pkg/gcp/loadbalancer/loadbalancersyncer.go, line 361 at r1 (raw file):
Comments from Reviewable |
Review status: 5 of 8 files reviewed at latest revision, 2 unresolved discussions. app/kubemci/pkg/gcp/backendservice/fake_backendservicesyncer.go, line 85 at r1 (raw file): Previously, G-Harmon wrote…
Yes our tests have duplicates. Added a comment to make that explicit app/kubemci/pkg/gcp/loadbalancer/loadbalancersyncer.go, line 361 at r1 (raw file): Previously, G-Harmon wrote…
Updated the variable names to clarify this as discussed. Comments from Reviewable |
Thanks for the review @G-Harmon |
I didn't quite follow the changes in loadbalancersyncer_test.go. I put questions there in that part of the patch. Reviewed 3 of 8 files at r1, 2 of 2 files at r2. app/kubemci/pkg/gcp/loadbalancer/loadbalancersyncer.go, line 352 at r2 (raw file):
app/kubemci/pkg/gcp/loadbalancer/loadbalancersyncer_test.go, line 369 at r2 (raw file): Quoted 4 lines of code…
Why do you remove some checks? like health checks, url maps, target proxies, forwarding rules? app/kubemci/pkg/gcp/loadbalancer/loadbalancersyncer_test.go, line 426 at r2 (raw file):
(Why don't you check as many things as before? like forwarding rules) Comments from Reviewable |
Review status: all files reviewed at latest revision, 3 unresolved discussions, some commit checks failed. app/kubemci/pkg/gcp/loadbalancer/loadbalancersyncer.go, line 352 at r2 (raw file): Previously, G-Harmon wrote…
sd for status description :) app/kubemci/pkg/gcp/loadbalancer/loadbalancersyncer_test.go, line 369 at r2 (raw file): Previously, G-Harmon wrote…
They are not affected by RemoveFromClusters. app/kubemci/pkg/gcp/loadbalancer/loadbalancersyncer_test.go, line 426 at r2 (raw file): Previously, G-Harmon wrote…
Same as above. Here am limiting the checks to resources that are affected by RemoveFromClusters. Comments from Reviewable |
Updated code as per comments. |
Feel free to merge as is, or add the one more tiny check.
Reviewed 2 of 2 files at r3. app/kubemci/pkg/gcp/loadbalancer/loadbalancersyncer_test.go, line 369 at r2 (raw file): Previously, nikhiljindal (Nikhil Jindal) wrote…
ah, okay, sounds good. app/kubemci/pkg/gcp/loadbalancer/loadbalancersyncer_test.go, line 452 at r3 (raw file):
Do we care about verifying both? I think I submitted this shortcoming, so totally optional. Comments from Reviewable |
Review status: all files reviewed at latest revision, 1 unresolved discussion. app/kubemci/pkg/gcp/loadbalancer/loadbalancersyncer_test.go, line 452 at r3 (raw file): Previously, G-Harmon wrote…
Good catch. Updated to verify both Comments from Reviewable |
Thanks for the review @G-Harmon Will merge once tests pass. |
Reviewed 2 of 2 files at r4. app/kubemci/pkg/gcp/loadbalancer/loadbalancersyncer_test.go, line 452 at r3 (raw file): Previously, nikhiljindal (Nikhil Jindal) wrote…
thanks! Comments from Reviewable |
Ref #58 and #145
Fixing TODOs from #151 and #149
Adding more unit tests for remove-clusters command.
Bulk of the PR is unit test changes, with minor bug fixes.
cc @csbell @G-Harmon @madhusudancs @perotinus
This change is