mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 01:58:41 -05:00
(POOLER-73) Add spec tests for check_pending_vm
Add spec tests for check_pending_vm
This commit is contained in:
parent
a9fc1bb8aa
commit
af9ec66b78
1 changed files with 15 additions and 0 deletions
|
|
@ -14,6 +14,21 @@ describe 'Pool Manager' do
|
||||||
|
|
||||||
subject { Vmpooler::PoolManager.new(config, logger, redis, metrics) }
|
subject { Vmpooler::PoolManager.new(config, logger, redis, metrics) }
|
||||||
|
|
||||||
|
describe '#check_pending_vm' do
|
||||||
|
let(:vsphere) { double('vsphere') }
|
||||||
|
|
||||||
|
before do
|
||||||
|
expect(subject).not_to be_nil
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'calls _check_pending_vm' do
|
||||||
|
expect(Thread).to receive(:new).and_yield
|
||||||
|
expect(subject).to receive(:_check_pending_vm).with(vm,pool,timeout,vsphere)
|
||||||
|
|
||||||
|
subject.check_pending_vm(vm, pool, timeout, vsphere)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
describe '#_check_pending_vm' do
|
describe '#_check_pending_vm' do
|
||||||
let(:pool_helper) { double('pool') }
|
let(:pool_helper) { double('pool') }
|
||||||
let(:vsphere) { {pool => pool_helper} }
|
let(:vsphere) { {pool => pool_helper} }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue