Fix no implicit conversion to rational from nil (#239)

* Fix no implicit conversion to rational from nil
Before this change if the boottime was nil, the check_ready
loop would exit on Time.now - host['boottime'] with a TypeError
in jruby. The boottime is nil when the power is Off so moving that check
earlier should catch that bug.

* set test data properly
This commit is contained in:
Samuel 2017-10-17 17:51:02 -05:00 committed by GitHub
parent be61501260
commit 0b5abd9bd3
2 changed files with 11 additions and 8 deletions

View file

@ -322,7 +322,9 @@ EOT
context 'is turned off' do
before(:each) do
host['boottime'] = nil
host['powerstate'] = 'PoweredOff'
ttl = 1440
end
it 'should move the VM to the completed queue' do