mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 10:08:40 -05:00
(POOLER-73) Modify spec tests for _check_running_vm
Modify spec tests for _check_running_vm
This commit is contained in:
parent
58175dec47
commit
cb4e1400aa
1 changed files with 4 additions and 4 deletions
|
|
@ -399,12 +399,10 @@ EOT
|
|||
end
|
||||
|
||||
describe '#_check_running_vm' do
|
||||
let(:pool_helper) { double('pool') }
|
||||
let(:vsphere) { {pool => pool_helper} }
|
||||
let(:vsphere) { double('vsphere') }
|
||||
|
||||
before do
|
||||
expect(subject).not_to be_nil
|
||||
$vsphere = vsphere
|
||||
end
|
||||
|
||||
before(:each) do
|
||||
|
|
@ -421,7 +419,9 @@ EOT
|
|||
context 'valid host' do
|
||||
let(:vm_host) { double('vmhost') }
|
||||
|
||||
it 'does not move vm when not poweredOn' do
|
||||
it 'should not move VM when not poweredOn' do
|
||||
# I'm not sure this test is useful. There is no codepath
|
||||
# in _check_running_vm that looks at Power State
|
||||
allow(vsphere).to receive(:find_vm).and_return vm_host
|
||||
allow(vm_host).to receive(:runtime).and_return true
|
||||
allow(vm_host).to receive_message_chain(:runtime, :powerState).and_return 'poweredOff'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue