Add console access check suggested by
It is indeed a good idea to verify whether an operator can access the
console of the VirtualMachineInstance with a long name.
@@ -191,6 +191,10 @@ var _ = Describe("VMIlifecycle", func() {
vmi, err = virtClient.VirtualMachineInstance(vmi.Namespace).Get(vmi.Name, &metav1.GetOptions{})
Expect(err).ToNot(HaveOccurred(), "cannot fetch VirtualMachineInstance %q: %v", vmi.Name, err)
Expect(vmi.IsReady()).To(BeTrue(), "VirtualMachineInstance %q is not ready: %v", vmi.Name, vmi.Status.Phase)
+ By("Obtaining serial console")
+ expecter, err := tests.LoggedInAlpineExpecter(vmi)
+ Expect(err).ToNot(HaveOccurred(), "VirtualMachineInstance %q console is not accessible: %v", vmi.Name, err)
+ expecter.Close()
})
})
