mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 12:15:52 +00:00
proxy/iptables: add packet-flow-based tests of iptables rules
Add a new framework for testing out how particular packets would be handled by a given set of iptables rules. (eg, "assert that a packet from 10.180.0.2 to 172.30.0.41:80 gets NATted to 10.180.0.1:80 without being masqueraded"). Add tests using this to all of the existing unit tests. This makes it easier to tell whether a given code change has any effect on behavior, without having to carefully examine the diffs to the generated iptables rules.
This commit is contained in:
parent
cd55f35306
commit
f4261283ac