Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/e2e/internal/util/vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func UntilSSHReady(f *framework.Framework, vm *v1alpha2.VirtualMachine, timeout
GinkgoHelper()

Eventually(func(g Gomega) {
result, err := f.SSHCommand(vm.Name, vm.Namespace, "echo 'test'")
result, err := f.SSHCommand(vm.Name, vm.Namespace, "echo 'test'", framework.WithSSHTimeout(5*time.Second))
g.Expect(err).NotTo(HaveOccurred())
g.Expect(result).To(ContainSubstring("test"))
}).WithTimeout(timeout).WithPolling(time.Second).Should(Succeed())
Expand Down
12 changes: 6 additions & 6 deletions test/e2e/vm/power_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ var _ = Describe("PowerState", func() {

util.UntilObjectPhase(string(v1alpha2.MachineRunning), framework.LongTimeout, t.VM)
util.UntilObjectPhase(string(v1alpha2.BlockDeviceAttachmentPhaseAttached), framework.MiddleTimeout, t.VMBDA)
util.UntilSSHReady(f, t.VM, framework.ShortTimeout)
util.UntilSSHReady(f, t.VM, framework.MiddleTimeout)
})

By("Shutdown VM by VMOP", func() {
Expand Down Expand Up @@ -101,7 +101,7 @@ var _ = Describe("PowerState", func() {
util.StartVirtualMachine(f, t.VM)
util.UntilObjectPhase(string(v1alpha2.MachineRunning), framework.MiddleTimeout, t.VM)
util.UntilObjectPhase(string(v1alpha2.BlockDeviceAttachmentPhaseAttached), framework.ShortTimeout, t.VMBDA)
util.UntilSSHReady(f, t.VM, framework.ShortTimeout)
util.UntilSSHReady(f, t.VM, framework.MiddleTimeout)
}
})

Expand All @@ -118,7 +118,7 @@ var _ = Describe("PowerState", func() {
util.UntilVirtualMachineRebooted(crclient.ObjectKeyFromObject(t.VM), runningLastTransitionTime, framework.LongTimeout)
util.UntilObjectPhase(string(v1alpha2.MachineRunning), framework.ShortTimeout, t.VM)
util.UntilObjectPhase(string(v1alpha2.BlockDeviceAttachmentPhaseAttached), framework.ShortTimeout, t.VMBDA)
util.UntilSSHReady(f, t.VM, framework.ShortTimeout)
util.UntilSSHReady(f, t.VM, framework.MiddleTimeout)
case v1alpha2.AlwaysOnUnlessStoppedManually, v1alpha2.ManualPolicy:
util.UntilObjectPhase(string(v1alpha2.MachineStopped), framework.LongTimeout, t.VM)
}
Expand All @@ -129,7 +129,7 @@ var _ = Describe("PowerState", func() {
util.StartVirtualMachine(f, t.VM)
util.UntilObjectPhase(string(v1alpha2.MachineRunning), framework.MiddleTimeout, t.VM)
util.UntilObjectPhase(string(v1alpha2.BlockDeviceAttachmentPhaseAttached), framework.ShortTimeout, t.VMBDA)
util.UntilSSHReady(f, t.VM, framework.ShortTimeout)
util.UntilSSHReady(f, t.VM, framework.MiddleTimeout)
}
})

Expand All @@ -153,7 +153,7 @@ var _ = Describe("PowerState", func() {
util.UntilVirtualMachineRebooted(crclient.ObjectKeyFromObject(t.VM), runningLastTransitionTime, framework.MiddleTimeout)
util.UntilObjectPhase(string(v1alpha2.MachineRunning), framework.ShortTimeout, t.VM)
util.UntilObjectPhase(string(v1alpha2.BlockDeviceAttachmentPhaseAttached), framework.ShortTimeout, t.VMBDA)
util.UntilSSHReady(f, t.VM, framework.ShortTimeout)
util.UntilSSHReady(f, t.VM, framework.MiddleTimeout)
})

By("Reboot VM by SSH", func() {
Expand All @@ -168,7 +168,7 @@ var _ = Describe("PowerState", func() {
util.UntilVirtualMachineRebooted(crclient.ObjectKeyFromObject(t.VM), runningLastTransitionTime, framework.LongTimeout)
util.UntilObjectPhase(string(v1alpha2.MachineRunning), framework.ShortTimeout, t.VM)
util.UntilObjectPhase(string(v1alpha2.BlockDeviceAttachmentPhaseAttached), framework.ShortTimeout, t.VMBDA)
util.UntilSSHReady(f, t.VM, framework.ShortTimeout)
util.UntilSSHReady(f, t.VM, framework.MiddleTimeout)
})

By("Check VM can reach external network", func() {
Expand Down
Loading