Skip to content

Commit

Permalink
change function tests from isACPIEnabled change
Browse files Browse the repository at this point in the history
Signed-off-by: Ashley Schuett <[email protected]>
  • Loading branch information
ashleyschuett committed Jun 16, 2021
1 parent 59f4405 commit 9e8bd7b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 26 deletions.
2 changes: 1 addition & 1 deletion tests/vm_watch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ var _ = Describe("[rfe_id:3423][crit:high][vendor:[email protected]][level:compo
Expect(err).ToNot(HaveOccurred())
Expect(len(vmiStatus)).To(Equal(5), fmt.Sprintf("vmiStatus is missing expected properties %v", vmiStatus))
Expect(net.ParseIP(vmiStatus[3])).ToNot(BeNil())
Expect(vmiStatus).To(ConsistOf(vmi.Name, MatchRegexp(vmAgeRegex), string(v12.Failed), vmiStatus[3], vmi.Status.NodeName),
Expect(vmiStatus).To(ConsistOf(vmi.Name, MatchRegexp(vmAgeRegex), string(v12.Succeeded), vmiStatus[3], vmi.Status.NodeName),
"VMI should be in the Failed phase")

By("Waiting for the second VMI to be created")
Expand Down
25 changes: 0 additions & 25 deletions tests/vmi_lifecycle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1463,31 +1463,6 @@ var _ = Describe("[rfe_id:273][crit:high][vendor:[email protected]][level:compon

})
})
Context("with ACPI and 0 grace period seconds", func() {
It("[test_id:1652]should result in vmi status failed", func() {

vmi = newCirrosVMI()
gracePeriod := int64(0)
vmi.Spec.TerminationGracePeriodSeconds = &gracePeriod

By("Creating the VirtualMachineInstance")
obj, err := virtClient.VirtualMachineInstance(tests.NamespaceTestDefault).Create(vmi)
Expect(err).ToNot(HaveOccurred(), "Should create VMI")

// wait until booted
vmi = tests.WaitUntilVMIReady(vmi, libnet.WithIPv6(console.LoginToCirros))

By("Deleting the VirtualMachineInstance")
Expect(virtClient.VirtualMachineInstance(vmi.Namespace).Delete(obj.Name, &metav1.DeleteOptions{})).To(Succeed(), "Should delete VMI")

By("Verifying VirtualMachineInstance's status is Failed")
Eventually(func() v1.VirtualMachineInstancePhase {
currVMI, err := virtClient.VirtualMachineInstance(tests.NamespaceTestDefault).Get(vmi.Name, &metav1.GetOptions{})
Expect(err).ToNot(HaveOccurred(), "Should get VMI")
return currVMI.Status.Phase
}, 5, 0.5).Should(Equal(v1.Failed), "VMI should be failed")
})
})
Context("with ACPI and some grace period seconds", func() {
table.DescribeTable("[rfe_id:273][crit:medium][vendor:[email protected]][level:component]should result in vmi status succeeded", func(gracePeriod int64) {
vmi = newCirrosVMI()
Expand Down

0 comments on commit 9e8bd7b

Please sign in to comment.