Drop unneeded NewWindowsModel from Netpol tests

The SCTP tests are already skipped on Windows, so we don't need any
other special handling.
This commit is contained in:
Dan Winship
2025-12-10 15:36:51 -05:00
parent 04d87a4b6e
commit a6e12205bd
2 changed files with 1 additions and 9 deletions

View File

@@ -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

View File

@@ -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)
}