diff --git a/ci/kind/kind-setup.sh b/ci/kind/kind-setup.sh index 61afe8c9051..59239286870 100755 --- a/ci/kind/kind-setup.sh +++ b/ci/kind/kind-setup.sh @@ -234,7 +234,7 @@ function create { kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 featureGates: - "NetworkPolicyEndPort": true + NetworkPolicyEndPort: true networking: disableDefaultCNI: true podSubnet: $POD_CIDR diff --git a/test/e2e/networkpolicy_test.go b/test/e2e/networkpolicy_test.go index c075536bea1..f20e7b1cd5a 100644 --- a/test/e2e/networkpolicy_test.go +++ b/test/e2e/networkpolicy_test.go @@ -808,6 +808,7 @@ func TestIngressPolicyWithoutPortNumber(t *testing.T) { func TestIngressPolicyWithEndPort(t *testing.T) { skipIfHasWindowsNodes(t) + skipIfProviderIs(t, "Jenkins", "Jenkins testbed doesn't support EndPort feature for now.") data, err := setupTest(t) if err != nil { @@ -895,7 +896,6 @@ func TestIngressPolicyWithEndPort(t *testing.T) { t.Fatalf("Pod %s should be able to connect %s, but was not able to connect", clientName, net.JoinHostPort(serverIP, fmt.Sprint(port))) } } - } if clusterInfo.podV4NetworkCIDR != "" { @@ -934,11 +934,11 @@ func TestIngressPolicyWithEndPort(t *testing.T) { } np, err := data.createNetworkPolicy("test-networkpolicy-ingress-with-endport", spec) if err != nil { - t.Fatalf("Error when creating network policy: %v", err) + t.Fatalf("Error when creating NetworkPolicy: %v", err) } defer func() { if err = data.deleteNetworkpolicy(np); err != nil { - t.Fatalf("Error when deleting network policy: %v", err) + t.Errorf("Error when deleting NetworkPolicy: %v", err) } }()