summaryrefslogtreecommitdiffstats
path: root/cucumber
diff options
context:
space:
mode:
authorPhilip Hands <phil@hands.com>2016-10-21 17:27:17 +0200
committerHolger Levsen <holger@layer-acht.org>2016-11-03 10:28:14 +0100
commitd69e87f6c154c2daaff7491c8c3272a45a89fc1d (patch)
tree0fa8c8661c5503502893c470df55399b412a837b /cucumber
parent67c0e4da20e659a85a1eb30cce72fa328ddf3627 (diff)
downloadjenkins.debian.net-d69e87f6c154c2daaff7491c8c3272a45a89fc1d.tar.xz
lvc: step to detect VM shutdown
Signed-off-by: Holger Levsen <holger@layer-acht.org>
Diffstat (limited to 'cucumber')
-rw-r--r--cucumber/features/step_definitions/common_steps.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/cucumber/features/step_definitions/common_steps.rb b/cucumber/features/step_definitions/common_steps.rb
index c40974f7..f98dee50 100644
--- a/cucumber/features/step_definitions/common_steps.rb
+++ b/cucumber/features/step_definitions/common_steps.rb
@@ -141,6 +141,13 @@ Given /^the computer has (\d+) ([[:alpha:]]+) of RAM$/ do |size, unit|
$vm.set_ram_size(size, unit)
end
+Then /^the VM shuts down within (\d+) minutes$/ do |mins|
+ timeout = 60*mins.to_i
+ try_for(timeout, :msg => "VM is still running after #{timeout} seconds") do
+ ! $vm.is_running?
+ end
+end
+
Given /^the computer is set to boot from the Tails DVD$/ do
$vm.set_cdrom_boot(TAILS_ISO)
end