-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
🐛 Nit: trim unncessary if check in templates/controllers/controller-test.go #2838
Conversation
|
Welcome @LittleWat! |
Hi @LittleWat. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
if err != nil { | ||
Expect(err).To(Not(HaveOccurred())) | ||
} | ||
Expect(err).To(Not(HaveOccurred())) |
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.
Hi @LittleWat,
Thank you for the contribution 🥇.
But this change cannot be done in the samples. the samples are generated automatically when we run make generate
, see: https://github.com/kubernetes-sigs/kubebuilder/blob/master/test/testdata/generate.sh
Therefore, this change needs to be done in the plugin implementation: https://github.com/kubernetes-sigs/kubebuilder/blob/master/pkg/plugins/golang/deploy-image/v1alpha1/scaffolds/internal/templates/controllers/controller-test.go#L138-L140
Could you please do that in the code implementation and run make generate to ensure that all samples will be updated according to, squash the commits and push it so we are able to get this one merged?
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.
Also, please note that you need assign to the CLA. #2838 (comment)
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.
@camilamacedo86 Thank you for the quick and detailed review! Oh, these test codes are generated, cool!
I edited the original template file and did make generate
and committed!
I also signed!
return err | ||
} | ||
return nil | ||
return k8sClient.Get(ctx, typeNamespaceName, found) |
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.
/ok-to-test |
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
JFY: @NikhilSharmaWe
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: camilamacedo86, LittleWat 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 |
Thank you for your nice examples!! (linked from #2836 (comment))
I just removed unnecessary if check