tests: changes probes tests to use a masquerade binding
The tests are testing both IPv4 and IPv6, however, IPv6 is not supported by
bridge binding so the communcation was with the virt-launcher pod and
not the VM.
@@ -228,14 +228,20 @@ var _ = SIGDescribe("[ref_id:1182]Probes", func() {
})
func createReadyAlpineVMIWithReadinessProbe(probe *v1.Probe) *v1.VirtualMachineInstance {
- vmi := libvmi.NewAlpine()
+ vmi := libvmi.NewAlpine(
+ libvmi.WithInterface(libvmi.InterfaceDeviceWithMasqueradeBinding()),
+ libvmi.WithNetwork(v1.DefaultPodNetwork()),
+ )
vmi.Spec.ReadinessProbe = probe
return tests.RunVMIAndExpectLaunchIgnoreWarnings(vmi, 180)
}
func createReadyAlpineVMIWithLivenessProbe(probe *v1.Probe) *v1.VirtualMachineInstance {
- vmi := libvmi.NewAlpine()
+ vmi := libvmi.NewAlpine(
+ libvmi.WithInterface(libvmi.InterfaceDeviceWithMasqueradeBinding()),
+ libvmi.WithNetwork(v1.DefaultPodNetwork()),
+ )
vmi.Spec.LivenessProbe = probe
return tests.RunVMIAndExpectLaunchIgnoreWarnings(vmi, 180)
