Skip to content

Commit

Permalink
connectivity/tests: omit vendor name from test name
Browse files Browse the repository at this point in the history
Construct the pod-to-cidr subtest name from the generic stringh "world"
and the IP that is actually used, e.g. using the external IP 1.2.3.4
would lead to the test being named "world-1234".

Fixes #1542

Signed-off-by: Tobias Klauser <[email protected]>
  • Loading branch information
tklauser committed Apr 27, 2023
1 parent 936f61e commit 742f724
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions connectivity/tests/to-cidr.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ package tests
import (
"context"
"fmt"
"strings"

"github.com/cilium/cilium-cli/connectivity/check"
)
Expand All @@ -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
Expand Down

0 comments on commit 742f724

Please sign in to comment.