diff options
author | Philip Hands <phil@hands.com> | 2016-10-21 17:27:17 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2016-11-03 10:28:14 +0100 |
commit | d69e87f6c154c2daaff7491c8c3272a45a89fc1d (patch) | |
tree | 0fa8c8661c5503502893c470df55399b412a837b /cucumber/features/step_definitions | |
parent | 67c0e4da20e659a85a1eb30cce72fa328ddf3627 (diff) | |
download | jenkins.debian.net-d69e87f6c154c2daaff7491c8c3272a45a89fc1d.tar.xz |
lvc: step to detect VM shutdown
Signed-off-by: Holger Levsen <holger@layer-acht.org>
Diffstat (limited to 'cucumber/features/step_definitions')
-rw-r--r-- | cucumber/features/step_definitions/common_steps.rb | 7 |
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 |