Skip to content
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

Merged
merged 14 commits into from
Aug 3, 2022
Merged

Clientset unit tests #16

merged 14 commits into from
Aug 3, 2022

Conversation

hellt
Copy link
Member

@hellt hellt commented Aug 3, 2022

supersedes #15

@codecov-commenter
Copy link

codecov-commenter commented Aug 3, 2022

Codecov Report

❗ No coverage uploaded for pull request base (main@f806296). Click here to learn what that means.
The diff coverage is n/a.

@@           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.

@hellt hellt mentioned this pull request Aug 3, 2022
Comment on lines 105 to 108
func (s *srlinuxClient) List(
ctx context.Context,
opts *metav1.ListOptions,
opts metav1.ListOptions,
) (*typesv1alpha1.SrlinuxList, error) {
Copy link
Member Author

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?

Copy link
Member Author

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

@hellt hellt merged commit fcde618 into main Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants