Skip to content

Commit

Permalink
report IP families that are being tested
Browse files Browse the repository at this point in the history
Signed-off-by: Pratyay Banerjee <[email protected]>
  • Loading branch information
Neilblaze authored and tklauser committed Mar 20, 2023
1 parent 721b66c commit 2ac56fc
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion connectivity/tests/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func (s *clientToClient) Run(ctx context.Context, t *check.Test) {
dst := dst // copy to avoid memory aliasing when using reference

t.ForEachIPFamily(func(ipFam check.IPFamily) {
t.NewAction(s, fmt.Sprintf("ping-%d", i), &src, &dst, ipFam).Run(func(a *check.Action) {
t.NewAction(s, fmt.Sprintf("ping-%s-%d", ipFam, i), &src, &dst, ipFam).Run(func(a *check.Action) {
a.ExecInPod(ctx, ct.PingCommand(dst, ipFam))

a.ValidateFlows(ctx, src, a.GetEgressRequirements(check.FlowParameters{
Expand Down
4 changes: 2 additions & 2 deletions connectivity/tests/encryption.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,12 @@ func testNoTrafficLeak(ctx context.Context, t *check.Test, s check.Scenario,
switch reqType {
case requestHTTP:
// Curl the server from the client to generate some traffic
t.NewAction(s, "curl", client, server, ipFam).Run(func(a *check.Action) {
t.NewAction(s, fmt.Sprintf("curl-%s", ipFam), client, server, ipFam).Run(func(a *check.Action) {
a.ExecInPod(ctx, t.Context().CurlCommand(server, ipFam))
})
case requestICMPEcho:
// Ping the server from the client to generate some traffic
t.NewAction(s, "ping", client, server, ipFam).Run(func(a *check.Action) {
t.NewAction(s, fmt.Sprintf("ping-%s", ipFam), client, server, ipFam).Run(func(a *check.Action) {
a.ExecInPod(ctx, t.Context().PingCommand(server, ipFam))
})
default:
Expand Down
2 changes: 1 addition & 1 deletion connectivity/tests/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func (s *podToHost) Run(ctx context.Context, t *check.Test) {
dst := check.ICMPEndpoint("", addr.Address)
ipFam := check.GetIPFamily(addr.Address)

t.NewAction(s, fmt.Sprintf("ping-%d", i), &pod, dst, ipFam).Run(func(a *check.Action) {
t.NewAction(s, fmt.Sprintf("ping-%s-%d", ipFam, i), &pod, dst, ipFam).Run(func(a *check.Action) {
a.ExecInPod(ctx, ct.PingCommand(dst, ipFam))

a.ValidateFlows(ctx, pod, a.GetEgressRequirements(check.FlowParameters{
Expand Down
4 changes: 2 additions & 2 deletions connectivity/tests/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func (s *podToPod) Run(ctx context.Context, t *check.Test) {
continue
}
t.ForEachIPFamily(func(ipFam check.IPFamily) {
t.NewAction(s, fmt.Sprintf("curl-%d", i), &client, echo, ipFam).Run(func(a *check.Action) {
t.NewAction(s, fmt.Sprintf("curl-%s-%d", ipFam, i), &client, echo, ipFam).Run(func(a *check.Action) {
if s.method == "" {
a.ExecInPod(ctx, ct.CurlCommand(echo, ipFam))
} else {
Expand Down Expand Up @@ -105,7 +105,7 @@ func (s *podToPodWithEndpoints) Run(ctx context.Context, t *check.Test) {
}

t.ForEachIPFamily(func(ipFam check.IPFamily) {
s.curlEndpoints(ctx, t, fmt.Sprintf("curl-%d", i), &client, echo, ipFam)
s.curlEndpoints(ctx, t, fmt.Sprintf("curl-%s-%d", ipFam, i), &client, echo, ipFam)
})

i++
Expand Down

0 comments on commit 2ac56fc

Please sign in to comment.