mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-17 15:50:10 +00:00
Fix spurious Feature tags on some NetworkPolicy tests
The "[Feature:SCTP]" tag was needed on "should not allow access by TCP when a policy specifies only SCTP" back when SCTP was alpha, because it wasn't possible to create a policy that even mentioned SCTP without enabling the feature gate. This no longer applies, and the tag was removed from the original copy of network_policy.go, but accidentally got left behind in the netpol/ version. Likewise, the newly-added "should not allow access by TCP when a policy specifies only UDP" got tagged "[Feature:UDP]", but this was never necessary, and is inconsistent with other UDP tests anyway. Similarly, we need "[Feature:SCTPConnectivity]" on tests that make SCTP connections, because that functionality is not available in all clusters, but "[Feature:UDPConnectivity]" is unnecessary and inconsistent.
This commit is contained in:
parent
6db6c80656
commit
4b0d0d6fc7
@ -1682,7 +1682,7 @@ var _ = common.SIGDescribe("NetworkPolicy [LinuxOnly]", func() {
|
||||
})
|
||||
cleanupServerPodAndService(f, podA, serviceA)
|
||||
})
|
||||
ginkgo.It("should not allow access by TCP when a policy specifies only SCTP [Feature:NetworkPolicy] [Feature:SCTP]", func() {
|
||||
ginkgo.It("should not allow access by TCP when a policy specifies only SCTP [Feature:NetworkPolicy]", func() {
|
||||
ginkgo.By("getting the state of the sctp module on nodes")
|
||||
nodes, err := e2enode.GetReadySchedulableNodes(f.ClientSet)
|
||||
framework.ExpectNoError(err)
|
||||
|
@ -1059,7 +1059,7 @@ var _ = common.SIGDescribe("Netpol", func() {
|
||||
ValidateOrFail(k8s, model, &TestCase{ToPort: 80, Protocol: v1.ProtocolTCP, Reachability: denyIngressToXReachability})
|
||||
})
|
||||
|
||||
ginkgo.It("should not allow access by TCP when a policy specifies only SCTP [Feature:NetworkPolicy] [Feature:SCTP]", func() {
|
||||
ginkgo.It("should not allow access by TCP when a policy specifies only SCTP [Feature:NetworkPolicy]", func() {
|
||||
ingressRule := networkingv1.NetworkPolicyIngressRule{}
|
||||
ingressRule.Ports = append(ingressRule.Ports, networkingv1.NetworkPolicyPort{Port: &intstr.IntOrString{IntVal: 81}, Protocol: &protocolSCTP})
|
||||
policy := GenNetworkPolicyWithNameAndPodMatchLabel("allow-only-sctp-ingress-on-port-81", map[string]string{"pod": "a"}, SetSpecIngressRules(ingressRule))
|
||||
@ -1074,7 +1074,7 @@ var _ = common.SIGDescribe("Netpol", func() {
|
||||
ValidateOrFail(k8s, model, &TestCase{ToPort: 81, Protocol: v1.ProtocolTCP, Reachability: reachability})
|
||||
})
|
||||
|
||||
ginkgo.It("should not allow access by TCP when a policy specifies only UDP [Feature:NetworkPolicy] [Feature:UDP]", func() {
|
||||
ginkgo.It("should not allow access by TCP when a policy specifies only UDP [Feature:NetworkPolicy]", func() {
|
||||
ingressRule := networkingv1.NetworkPolicyIngressRule{}
|
||||
ingressRule.Ports = append(ingressRule.Ports, networkingv1.NetworkPolicyPort{Port: &intstr.IntOrString{IntVal: 81}, Protocol: &protocolUDP})
|
||||
policy := GenNetworkPolicyWithNameAndPodMatchLabel("allow-only-udp-ingress-on-port-81", map[string]string{"pod": "a"}, SetSpecIngressRules(ingressRule))
|
||||
@ -1091,7 +1091,7 @@ var _ = common.SIGDescribe("Netpol", func() {
|
||||
})
|
||||
})
|
||||
|
||||
var _ = common.SIGDescribe("Netpol [Feature:UDPConnectivity][LinuxOnly]", func() {
|
||||
var _ = common.SIGDescribe("Netpol [LinuxOnly]", func() {
|
||||
f := framework.NewDefaultFramework("udp-network-policy")
|
||||
|
||||
ginkgo.BeforeEach(func() {
|
||||
|
Loading…
Reference in New Issue
Block a user