test: migrate K8sDatapathConfig to component-based tests#44618
Conversation
5bc6e3b to
a5393d0
Compare
|
/test |
ti-mo
left a comment
There was a problem hiding this comment.
Ack for datapath/linux/config tests. Not sure if they're really useful, but we'll remove them when the respective defines get ported to runtime configs. Thanks for picking this up!
bimmlerd
left a comment
There was a problem hiding this comment.
a few minor things from my side, but looks promising!
smagnani96
left a comment
There was a problem hiding this comment.
Thanks for the contrib, don't have new feedback other than what other reviewers already pointed out. I'm migrating some Ginkgo tests too, and I think after this prepareHostPolicyEnforcement would be only used in # K8sDatapathServicesTest Checks E/W loadbalancing (ClusterIP, NodePort from inside cluster, etc) with L7 policy Tests NodePort with L7 Policy (https://github.com/cilium/cilium/blob/v1.19/.github/actions/ginkgo/main-focus.yaml#L179). However, this test IIUC simply checks NodePort with HostFirewall enabled, and we should already have coverage of that in CI. So for the sake of the PR it's good to move the function, but I'll prune it in #44168.
a5393d0 to
e004f85
Compare
e004f85 to
e08667f
Compare
e08667f to
ecf3d2f
Compare
ecf3d2f to
a58bd81
Compare
a58bd81 to
8326293
Compare
5f5de5d to
265ef1d
Compare
qmonnet
left a comment
There was a problem hiding this comment.
Looks good, the new picture is on the preview. Thanks!
|
/test |
|
|
Remove the legacy K8sDatapathConfig Ginkgo test suite
(test/k8s/datapath_configuration.go) and replace it with
component-based tests in the relevant packages:
- pkg/datapath/iptables/iptables_test.go:
- TestAddNoTrackPodTrafficRules: validates NOTRACK iptables rules
for pod traffic (replaces "Skip conntrack for pod traffic")
- TestAllEgressMasqueradeCmdsRandomFully: validates --random-fully
in masquerade rules (replaces "iptables masquerading with random-fully")
- pkg/datapath/linux/config/config_test.go:
- TestPrivilegedWriteNodeConfigMonitorAggregation: validates
CT_REPORT_INTERVAL and CT_REPORT_FLAGS BPF defines
(replaces MonitorAggregation tests)
- TestPrivilegedWriteNodeConfigHostFirewall: validates
ENABLE_HOST_FIREWALL BPF define (replaces Host firewall tests)
- TestPrivilegedWriteNodeConfigIPv4Only: validates ENABLE_IPV4/IPV6
defines (replaces IPv4Only test)
- TestPrivilegedWriteNodeConfigBPFMasquerade: validates BPF masquerade
defines (replaces BPF masquerading with ip-masq-agent tests)
Move prepareHostPolicyEnforcement to test/k8s/service_helpers.go
as it is still used by test/k8s/services.go.
Clean up CI references: remove f07/f08/f09/f20 focus entries from
main-focus.yaml, junit reporter, CODEOWNERS, and documentation.
Signed-off-by: saiaunghlyanhtet <saiaunghlyanhtet2003@gmail.com>
265ef1d to
ab6fa25
Compare
|
/ci-runtime |
Thanks. Fixed. |
|
/test |
|
I don't know why the bot isn't adding the |
Remove the legacy K8sDatapathConfig Ginkgo test suite (test/k8s/datapath_configuration.go) and replace it with component-based tests.
Related: #37837
Fixes: #44166