diff --git a/connectivity/tests/to-cidr.go b/connectivity/tests/to-cidr.go index 71f1f04681..4c9e8cd16c 100644 --- a/connectivity/tests/to-cidr.go +++ b/connectivity/tests/to-cidr.go @@ -6,6 +6,7 @@ package tests import ( "context" "fmt" + "strings" "github.com/cilium/cilium-cli/connectivity/check" ) @@ -24,13 +25,11 @@ func (s *podToCIDR) Name() string { } func (s *podToCIDR) Run(ctx context.Context, t *check.Test) { - eps := []check.TestPeer{ - check.HTTPEndpoint("cloudflare-1001", "https://"+t.Context().Params().ExternalOtherIP), - check.HTTPEndpoint("cloudflare-1111", "https://"+t.Context().Params().ExternalIP), - } ct := t.Context() - for _, ep := range eps { + for _, ip := range []string{ct.Params().ExternalIP, ct.Params().ExternalOtherIP} { + ep := check.HTTPEndpoint(fmt.Sprintf("world-%s", strings.ReplaceAll(ip, ".", "")), "https://"+ip) + var i int for _, src := range ct.ClientPods() { src := src // copy to avoid memory aliasing when using reference