-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
🐛 Fix unit test coverage in KubeadmConfig #7678
🐛 Fix unit test coverage in KubeadmConfig #7678
Conversation
aed0ce2
to
940d233
Compare
/retest |
@@ -92,11 +92,17 @@ func TestKubeadmConfigReconciler_MachineToBootstrapMapFuncReturn(t *testing.T) { | |||
// Reconcile returns early if the kubeadm config is ready because it should never re-generate bootstrap data. | |||
func TestKubeadmConfigReconciler_Reconcile_ReturnEarlyIfKubeadmConfigIsReady(t *testing.T) { | |||
g := NewWithT(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.
The intention here was to ensure that the tests were actually testing conditions resulting from reconcile, rather than just the controller runtime result. Overall package test coverage goes from 68.8 -> 71.1 with these changes.
/retest |
1 similar comment
/retest |
Signed-off-by: killianmuldoon <kmuldoon@vmware.com>
940d233
to
484b4cf
Compare
/lgtm /assign @fabriziopandini |
LGTM label has been added. Git tree hash: bc12956dc7a988ccf27cd4dab8f389fbcca8a4b8
|
Let's move on, we can follow-up if anyone has further comments /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sbueringer 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 |
Signed-off-by: killianmuldoon kmuldoon@vmware.com
A number of the tests in the kubeadmconfig controller were testing insufficient conditions, and some were not testing what they intended to.
This PR is a first round of fixing up the test coverage.