tests: Fix migration test
We add a number of disks before adding the network interface,
which means that we can't simply replace vmi.Spec.Domain.Devices
outright or the VM will only get the network interface and no
other device.
@@ -1823,9 +1823,12 @@ var _ = Describe("[Serial][rfe_id:393][crit:high][vendor:cnv-qe@redhat.com][leve
}
tests.AddLabelDownwardAPIVolume(vmi, downwardAPIName)
- vmi.Spec.Domain.Devices = v1.Devices{Interfaces: []v1.Interface{{Name: "default", Tag: "testnic",
+ vmi.Spec.Domain.Devices.Interfaces = []v1.Interface{{Name: "default", Tag: "testnic",
InterfaceBindingMethod: v1.InterfaceBindingMethod{
- Masquerade: &v1.InterfaceMasquerade{}}}}}
+ Masquerade: &v1.InterfaceMasquerade{}}}}
+
+ Expect(len(vmi.Spec.Domain.Devices.Disks)).To(Equal(6))
+ Expect(len(vmi.Spec.Domain.Devices.Interfaces)).To(Equal(1))
vmi = runVMIAndExpectLaunch(vmi, 180)
