Skip to content

Commit

Permalink
UDN: Adapt tests to use managedTap instead passt
Browse files Browse the repository at this point in the history
Since hostname is populated now via DHCP, we can always use
the vmi name in the console expecter.

Signed-off-by: Or Shoval <[email protected]>
  • Loading branch information
oshoval committed Oct 14, 2024
1 parent 0396fe0 commit 9796e8b
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions test/e2e/kubevirt.go
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,7 @@ passwd:
}, butane)
Expect(err).ToNot(HaveOccurred())
vm.Spec.Template.Spec.Domain.Devices.Interfaces[0].Bridge = nil
vm.Spec.Template.Spec.Domain.Devices.Interfaces[0].Binding = &kubevirtv1.PluginBinding{Name: "passt"}
vm.Spec.Template.Spec.Domain.Devices.Interfaces[0].Binding = &kubevirtv1.PluginBinding{Name: "managedTap"}
createVirtualMachine(vm)
return vm.Name
},
Expand Down Expand Up @@ -1226,7 +1226,7 @@ passwd:
}, butane)
Expect(err).ToNot(HaveOccurred())
vmi.Spec.Domain.Devices.Interfaces[0].Bridge = nil
vmi.Spec.Domain.Devices.Interfaces[0].Binding = &kubevirtv1.PluginBinding{Name: "passt"}
vmi.Spec.Domain.Devices.Interfaces[0].Binding = &kubevirtv1.PluginBinding{Name: "managedTap"}
createVirtualMachineInstance(vmi)
return vmi.Name
},
Expand Down Expand Up @@ -1311,11 +1311,7 @@ passwd:

step := by(vmi.Name, "Login to virtual machine for the first time")
Eventually(func() error {
if td.role != "primary" {
return kubevirt.LoginToFedora(vmi, "core", "fedora")
} else {
return kubevirt.LoginToFedoraWithHostname(vmi, "core", "fedora", "localhost")
}
return kubevirt.LoginToFedora(vmi, "core", "fedora")
}).
WithTimeout(5*time.Second).
WithPolling(time.Second).
Expand Down Expand Up @@ -1344,11 +1340,7 @@ passwd:
td.test.cmd()

step = by(vm.Name, fmt.Sprintf("Login to virtual machine after %s %s", td.resource.description, td.test.description))
if td.role != "primary" {
Expect(kubevirt.LoginToFedora(vmi, "core", "fedora")).To(Succeed(), step)
} else {
Expect(kubevirt.LoginToFedoraWithHostname(vmi, "core", "fedora", "localhost")).To(Succeed(), step)
}
Expect(kubevirt.LoginToFedora(vmi, "core", "fedora")).To(Succeed(), step)
var obtainedAddresses []string

if td.role != "primary" { // expect 2 addresses on dual-stack deployments; 1 on single-stack
Expand Down

0 comments on commit 9796e8b

Please sign in to comment.