mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-07-22 01:23:18 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user