-
Notifications
You must be signed in to change notification settings - Fork 84
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
Improve UT coverage for IBMPowerVS controllers #726
Conversation
✅ Deploy Preview for kubernetes-sigs-cluster-api-ibmcloud ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Adding changes for junit reporting on the test job. |
@Amulyam24 can you submit a different PR for that? lets not club everything into one PR! |
Sure, makes sense. Will move the changes to a follow up PR. |
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.
/lgtm
@Amulyam24 See if you can optimise code wherever possible by reusing vars (bits which are possible, to avoid duplication)
"sigs.k8s.io/cluster-api-provider-ibmcloud/pkg/cloud/services/powervs/mock" | ||
) | ||
|
||
func TestIBMPowerVSMachineReconciler_Reconcile(t *testing.T) { |
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.
most of the test contains text like should Reconcile vs not, how do we confirm if it is really for reconciled or not?!
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.
In some of the test cases, we are checking if the reconcile request is requeued but I'm not sure if there's a way to check for the actual reconciliation of the object for each case in unit tests.
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.
I don't see a better way to deal with this as of now, will merge this code for now.
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Amulyam24, mkumatag 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 |
What this PR does / why we need it:
Adds unit tests for PowerVS controllers.
Increases the coverage of package
controllers
from 2.8% to 26.1%Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #
Special notes for your reviewer:
/area provider/ibmcloud
Release note: