8000 iptables: Unit tests cleanup by pippolo84 · Pull Request #31368 · cilium/cilium · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

iptables: Unit tests cleanup #31368

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

Merged
merged 2 commits into from
Mar 26, 2024

Conversation

pippolo84
Copy link
Member
@pippolo84 pippolo84 commented Mar 13, 2024

Small cleanup to iptables unit tests to:

  • migrate from gopkg.in/check.v1 to standard Go testing framework
  • trim down the iptablesInterface and simplify mocking

Note to the reviewers: better reviewed commit by commit

Depends on #31068 and #31099

@pippolo84 pippolo84 added release-note/misc This PR makes changes that have no direct user impact. dont-merge/blocked Another PR must be merged before this one. area/iptables Impacts how Cilium interacts with iptables. labels Mar 13, 2024
Migrate tests from checkmate (the temporary wrapper for
gopkg.in/check.v1) to the standard Go testing framework.

Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
The current iptablesInteface is mainly used to mock the iptables and
ip6tables command in unit testing. Hence it includes the runProgOutput
and runProg methods.  However, it also includes other methods that are
not strictly necessary for testing, so it may be built as an extension
of a slim runnable interface that includes just what we need to mock the
iptables command execution.

As a side benefit, this eliminates the need for mocking the getVersion
method.

Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
@pippolo84 pippolo84 force-pushed the pr/pippolo84/iptables-tests-cleanup branch from d78d386 to 0cc43ee Compare March 22, 2024 09:56
@pippolo84 pippolo84 removed the dont-merge/blocked Another PR must be merged before this one. label Mar 22, 2024
@pippolo84 pippolo84 marked this pull request as ready for review March 22, 2024 09:57
@pippolo84 pippolo84 requested a review from a team as a code owner March 22, 2024 09:57
@pippolo84 pippolo84 requested a review from markpash March 22, 2024 09:57
@pippolo84
Copy link
Member Author

/test

@pippolo84 pippolo84 removed the request for review from markpash March 26, 2024 16:49
@pippolo84
Copy link
Member Author

Removed reviewer whose codeowners has already been covered.

@pippolo84
Copy link
Member Author

ci-ginkgo tracked here, rerunning

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label 7BC7 Mar 26, 2024
@tklauser tklauser added this pull request to the merge queue Mar 26, 2024
Merged via the queue into cilium:main with commit 9b1a7c3 Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/iptables Impacts how Cilium interacts with iptables. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0