Use PingFromVMConsole for ipv6 instead of trace route
Trace route was used because of
a flaky behaviour of ping.
Since then the new PingFromVMConsole
was presented, and should be used.
@@ -730,12 +730,11 @@ var _ = Describe("[rfe_id:694][crit:medium][vendor:cnv-qe@redhat.com][level:comp
for _, serverIP := range serverVMI.Status.Interfaces[0].IPs {
if netutils.IsIPv6String(serverIP) {
- By("Checking traceroute (IPv6) from vmi to cluster nodes gateway")
+ By("Checking ping (IPv6) from vmi to cluster nodes gateway")
// Cluster nodes subnet (docker network gateway)
// Docker network subnet cidr definition:
// https://github.com/kubevirt/project-infra/blob/master/github/ci/shared-deployments/files/docker-daemon-mirror.conf#L5
- err := tests.CheckForTextExpecter(serverVMI, createExpectTraceroute6("2001:db8:1::1"), 30)
- Expect(err).ToNot(HaveOccurred(), "Failed to traceroute to VMI %s within the given timeout", serverVMI.Name)
+ Expect(tests.PingFromVMConsole(serverVMI, "2001:db8:1::1")).To(Succeed())
} else {
if ipv4NetworkCIDR == "" {
ipv4NetworkCIDR = api.DefaultVMCIDR
@@ -845,21 +844,6 @@ func NewRandomVMIWithInvalidNetworkInterface() *v1.VirtualMachineInstance {
return vmi
}
-func createExpectTraceroute6(address string) []expect.Batcher {
- return []expect.Batcher{
- &expect.BSnd{S: "\n"},
- &expect.BExp{R: "\\$ "},
- &expect.BSnd{S: "traceroute -6 " + address + " -w1 > tr\n"},
- &expect.BExp{R: "\\$ "},
- &expect.BSnd{S: "echo $?\n"},
- &expect.BExp{R: tests.RetValue("0")},
- &expect.BSnd{S: "cat tr | grep -q \"*\\|!\"\n"},
- &expect.BExp{R: "\\$ "},
- &expect.BSnd{S: "echo $?\n"},
- &expect.BExp{R: tests.RetValue("1")},
- }
-}
-
func createExpectStartTcpServer(port string) []expect.Batcher {
return []expect.Batcher{
&expect.BSnd{S: "\n"},
