diff --git a/connectivity/check/test.go b/connectivity/check/test.go index 955e646016..957108799c 100644 --- a/connectivity/check/test.go +++ b/connectivity/check/test.go @@ -482,8 +482,8 @@ type CiliumEgressGatewayPolicyParams struct { // PodSelectorKind is used to select the client pods. The parameter is used to select pods with a matching "kind" label PodSelectorKind string - // ExcludedCIDRs controls how the ExcludedCIDRs property should be configured - ExcludedCIDRs ExcludedCIDRsKind + // ExcludedCIDRsConf controls how the ExcludedCIDRsConf property should be configured + ExcludedCIDRsConf ExcludedCIDRsKind } // WithCiliumEgressGatewayPolicy takes a string containing a YAML policy @@ -529,7 +529,7 @@ func (t *Test) WithCiliumEgressGatewayPolicy(params CiliumEgressGatewayPolicyPar // Set the excluded CIDRs pl[i].Spec.ExcludedCIDRs = []v2.IPv4CIDR{} - switch params.ExcludedCIDRs { + switch params.ExcludedCIDRsConf { case ExternalNodeExcludedCIDRs: for _, nodeWithoutCiliumIP := range t.Context().params.NodesWithoutCiliumIPs { if parsedIP := net.ParseIP(nodeWithoutCiliumIP.IP); parsedIP.To4() == nil { diff --git a/connectivity/suite.go b/connectivity/suite.go index 936a759cc6..1ccf0cdfa8 100644 --- a/connectivity/suite.go +++ b/connectivity/suite.go @@ -809,9 +809,9 @@ func Run(ctx context.Context, ct *check.ConnectivityTest, addExtraTests func(*ch if versioncheck.MustCompile(">=1.14.0")(ct.CiliumVersion) { ct.NewTest("egress-gateway-excluded-cidrs"). WithCiliumEgressGatewayPolicy(check.CiliumEgressGatewayPolicyParams{ - Name: "cegp-sample-client", - PodSelectorKind: "client", - ExcludedCIDRs: check.ExternalNodeExcludedCIDRs, + Name: "cegp-sample-client", + PodSelectorKind: "client", + ExcludedCIDRsConf: check.ExternalNodeExcludedCIDRs, }). WithFeatureRequirements(features.RequireEnabled(features.EgressGateway), features.RequireEnabled(features.NodeWithoutCilium)).