Skip to content

Commit

Permalink
Added test for repeatingly pausing / unpausing VM
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Sluiter <[email protected]>
  • Loading branch information
slintes committed Nov 5, 2019
1 parent 53177fa commit 49b19c5
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/pausing_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,24 @@ var _ = Describe("[rfe_id:3064][crit:medium][vendor:[email protected]][level:com
})
})

When("paused via virtctl multiple times", func() {
It("should signal unpaused state with removed condition at the end", func() {
runVMI()

for i := 0; i < 3; i++ {
By("Pausing VMI")
command := tests.NewRepeatableVirtctlCommand("pause", "vmi", "--namespace", tests.NamespaceTestDefault, vmi.Name)
Expect(command()).To(Succeed())
tests.WaitForVMICondition(virtClient, vmi, v1.VirtualMachineInstancePaused, 30)

By("Unpausing VMI")
command = tests.NewRepeatableVirtctlCommand("unpause", "vmi", "--namespace", tests.NamespaceTestDefault, vmi.Name)
Expect(command()).To(Succeed())
tests.WaitForVMIConditionRemovedOrFalse(virtClient, vmi, v1.VirtualMachineInstancePaused, 30)
}
})
})

Context("with a LivenessProbe configured", func() {
When("paused via virtctl", func() {
It("should not be paused", func() {
Expand Down

0 comments on commit 49b19c5

Please sign in to comment.