From a6e12205bd5922017aa2bdf36a26c5c228463d77 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Wed, 10 Dec 2025 15:36:51 -0500 Subject: [PATCH] Drop unneeded NewWindowsModel from Netpol tests The SCTP tests are already skipped on Windows, so we don't need any other special handling. --- test/e2e/network/netpol/model.go | 5 ----- test/e2e/network/netpol/network_policy.go | 5 +---- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/test/e2e/network/netpol/model.go b/test/e2e/network/netpol/model.go index 60d93a1bd42..3146b28a2f5 100644 --- a/test/e2e/network/netpol/model.go +++ b/test/e2e/network/netpol/model.go @@ -35,11 +35,6 @@ type Model struct { Protocols []v1.Protocol } -// NewWindowsModel returns a model specific to windows testing. -func NewWindowsModel(namespaceBaseNames []string, podNames []string, ports []int32) *Model { - return NewModel(namespaceBaseNames, podNames, ports, []v1.Protocol{v1.ProtocolTCP, v1.ProtocolUDP}) -} - // NewModel instantiates a model based on: // - namespaceBaseNames // - pods diff --git a/test/e2e/network/netpol/network_policy.go b/test/e2e/network/netpol/network_policy.go index a527cf6b935..d41cad1a1cc 100644 --- a/test/e2e/network/netpol/network_policy.go +++ b/test/e2e/network/netpol/network_policy.go @@ -1329,7 +1329,7 @@ var _ = common.SIGDescribe("Netpol", feature.SCTPConnectivity, "[LinuxOnly]", fu f.NamespacePodSecurityLevel = admissionapi.LevelBaseline var k8s *kubeManager ginkgo.BeforeEach(func() { - // Windows does not support network policies. + // Windows does not support SCTP e2eskipper.SkipIfNodeOSDistroIs("windows") }) @@ -1418,9 +1418,6 @@ func getNamespaceBaseNames(rootNs string) []string { // defaultModel creates a new "model" pod system under namespaces (x,y,z) which has pods a, b, and c. Thus resulting in the // truth table matrix that is identical for all tests, comprising 81 total connections between 9 pods (x/a, x/b, x/c, ..., z/c). func defaultModel(namespaces []string, protocols []v1.Protocol, ports []int32) *Model { - if framework.NodeOSDistroIs("windows") { - return NewWindowsModel(namespaces, []string{"a", "b", "c"}, ports) - } return NewModel(namespaces, []string{"a", "b", "c"}, ports, protocols) }