Skip to content

Commit

Permalink
Add kube-apiserver feature-gates check
Browse files Browse the repository at this point in the history
Signed-off-by: wgrayson <wgrayson@vmware.com>
  • Loading branch information
GraysonWu committed May 26, 2021
1 parent 24d1945 commit f5187aa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/e2e/networkpolicy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,11 @@ func TestIngressPolicyWithEndPort(t *testing.T) {
}
}()

if np.Spec.Ingress[0].Ports[0].EndPort == nil {
t.Skipf("Skipping test as the kube-apiserver doesn't support `endPort` " +
"or `NetworkPolicyEndPort` feature-gate is not enabled.")
}

npCheck := func(serverIP string) {
for _, port := range serverPorts {
err = data.runNetcatCommandFromTestPod(clientName, serverIP, port)
Expand Down

0 comments on commit f5187aa

Please sign in to comment.