Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
Signed-off-by: zhangzujian <[email protected]>
  • Loading branch information
zhangzujian committed Jan 3, 2025
1 parent ace91db commit 054d3d9
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/e2e/framework/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,21 @@ func CheckPodEgressRoutes(ns, pod string, ipv4, ipv6 bool, ttl int, expectedHops

lines := strings.Split(strings.TrimSpace(output), "\n")
fields := strings.Fields(lines[len(lines)-1])
if !(len(fields) > 2 && slices.Contains(expectedHops, fields[1])) {
stdout, stderr, err := NBExec("ovn-nbctl", "lr-route-list", "ovn-cluster")
if err != nil {
Logf("Failed to run lr-route-list: %v, %s", err, stderr)
} else {
Logf("lr-route-list:\n%s", stdout)
}
stdout, stderr, err = NBExec("ovn-nbctl", "lr-policy-list", "ovn-cluster")
if err != nil {
Logf("Failed to run lr-roupolicyte-list: %v, %s", err, stderr)
} else {
Logf("lr-policy-list:\n%s", stdout)
}
return false, nil
}
return len(fields) > 2 && slices.Contains(expectedHops, fields[1]), nil
}, fmt.Sprintf("expected hops: %s", strings.Join(expectedHops, ", ")))
}
Expand Down

0 comments on commit 054d3d9

Please sign in to comment.