restore tests dont login and mount if taken online snapshot
If the snapsho is online then we dont logout and we dont
shut down the vm so no need to remount.
@@ -434,18 +434,15 @@ var _ = SIGDescribe("[Serial]VirtualMachineRestore Tests", func() {
By("creating snapshot")
snapshot = createSnapshot(vm)
+ batch = nil
if !onlineSnapshot {
By("Starting VM")
vm = tests.StartVirtualMachine(vm)
- }
vmi, err = virtClient.VirtualMachineInstance(vm.Namespace).Get(vm.Name, &metav1.GetOptions{})
Expect(err).ToNot(HaveOccurred())
- By("updating message")
Expect(libnet.WithIPv6(console.LoginToCirros)(vmi)).To(Succeed())
- batch = nil
-
if device != "" {
batch = append(batch, []expect.Batcher{
&expect.BSnd{S: "sudo mkdir -p /test\n"},
@@ -456,6 +453,9 @@ var _ = SIGDescribe("[Serial]VirtualMachineRestore Tests", func() {
&expect.BExp{R: console.RetValue("0")},
}...)
}
+ }
+
+ By("updating message")
batch = append(batch, []expect.Batcher{
&expect.BSnd{S: "sudo mkdir -p /test/data\n"},
