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.
This commit is contained in:
Samuel Beaulieu 2017-09-28 11:15:03 -05:00
parent be61501260
commit f63f68ceab
2 changed files with 10 additions and 8 deletions

View file

@ -322,6 +322,7 @@ EOT
context 'is turned off' do
before(:each) do
host['boottime'] = nil
host['powerstate'] = 'PoweredOff'
end