-
Notifications
You must be signed in to change notification settings - Fork 3
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
Clientset unit tests #16
Conversation
Codecov Report
@@ Coverage Diff @@
## main #16 +/- ##
=======================================
Coverage ? 19.61%
=======================================
Files ? 10
Lines ? 775
Branches ? 0
=======================================
Hits ? 152
Misses ? 619
Partials ? 4 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
api/clientset/v1alpha1/srlinux.go
Outdated
func (s *srlinuxClient) List( | ||
ctx context.Context, | ||
opts *metav1.ListOptions, | ||
opts metav1.ListOptions, | ||
) (*typesv1alpha1.SrlinuxList, error) { |
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.
@marcushines can you share your expert opinion on that func signature and the need for ListOptions to be copied?
The reason I used a pointer here is based on a purely noob approach - a code analyzer told me that the struct is "sizeable", so why not using a pointer?
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 see, this is a common interface pattern used in k8s, probably for a good reason
https://pkg.go.dev/k8s.io/client-go@v0.24.3/kubernetes/typed/core/v1#PodInterface
supersedes #15