-
Notifications
You must be signed in to change notification settings - Fork 3.4k
refactor: cleanups in unparallel tests and replace netlink with safenetlink #41363
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
Conversation
Temporarily removing `//go:build unparallel` raised a warning in the editor about these unused variables. Let's remove them. Signed-off-by: Simone Magnani <simone.magnani@isovalent.com>
This is just to remove a warning from the linter about possible refactorization of if-else statements to switch statements. Signed-off-by: Simone Magnani <simone.magnani@isovalent.com>
This is to cleanup the unused `log` variable from the `parseSPI` and `LoadIPSecKeys` functions. No functional changes, just to golangci-lint happy. Signed-off-by: Simone Magnani <simone.magnani@isovalent.com>
This commit removes the occurrences of netlink.Xfrm{State,Policy}List in favor of the safenetlink package. This is to overcome an issue returned by `golangci-lint run` due to using netlink rather than safelinknet. An example of error returned: `pkg/datapath/linux/node_linux_test.go:1195:19: use of `netlink.XfrmPolicyList` forbidden because "Found netlink function which can return ErrDumpInterrupted. Use safenetlink package instead." (forbidigo)` We do not see this in CI given these test files start with `//go:build unparallel`. From the moment we remove that line (I did that to have linting during this patch series) the error is returned. Signed-off-by: Simone Magnani <simone.magnani@isovalent.com>
We no longer use this method, not even in tests, let's remove it. Signed-off-by: Simone Magnani <simone.magnani@isovalent.com>
fe80488
to
17bf284
Compare
/test |
Checkpatch is failing due to the issue of previous days: images not being available.
|
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.
Thanks, very easy to review thanks to the descriptions!
This PR is mostly just to please
golangci-lint run
and editor linters.Please refer to commits.