mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-20 10:20:51 +00:00
Fix SCTP default-deny test
The test is about SCTP and the accessed service only forwarded SCTP traffic to the server Pod but the client Pod used TCP protocol, so the test traffic never reached the server Pod and the test NetworkPolicy was never enforced, which lead to test success even if the default-deny policy was implemented wrongly. In some cases it may got failure result if there was an external server having same IP as the cluster IP and listening to TCP 80 port. Signed-off-by: Quan Tian <qtian@vmware.com>
This commit is contained in:
parent
35940b707c
commit
5dd9184945
@ -1780,7 +1780,7 @@ var _ = common.SIGDescribe("NetworkPolicy [Feature:SCTPConnectivity][LinuxOnly][
|
||||
|
||||
// Create a pod with name 'client-cannot-connect', which will attempt to communicate with the server,
|
||||
// but should not be able to now that isolation is on.
|
||||
testCannotConnect(f, f.Namespace, "client-cannot-connect", service, 80)
|
||||
testCannotConnectProtocol(f, f.Namespace, "client-cannot-connect", service, 80, v1.ProtocolSCTP)
|
||||
})
|
||||
|
||||
ginkgo.It("should enforce policy based on Ports [Feature:NetworkPolicy]", func() {
|
||||
|
Loading…
Reference in New Issue
Block a user