mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-27 10:28:41 -05:00
Merge branch 'master' into providers
This commit is contained in:
commit
c9c97e1568
8 changed files with 311 additions and 56 deletions
|
|
@ -750,6 +750,12 @@ EOT
|
|||
|
||||
subject._destroy_vm(vm,pool,provider)
|
||||
end
|
||||
|
||||
it 'should dereference the mutex' do
|
||||
expect(subject).to receive(:dereference_mutex)
|
||||
|
||||
subject._destroy_vm(vm,pool,provider)
|
||||
end
|
||||
end
|
||||
|
||||
context 'when the VM destruction raises an eror' do
|
||||
|
|
@ -1714,6 +1720,26 @@ EOT
|
|||
end
|
||||
end
|
||||
|
||||
describe '#dereference_mutex' do
|
||||
it 'should return nil when no mutex is dereferenced' do
|
||||
expect(subject.dereference_mutex(vm)).to be_nil
|
||||
end
|
||||
|
||||
it 'should return true when a mutex is dereferenced' do
|
||||
subject.vm_mutex(vm)
|
||||
expect(subject.dereference_mutex(vm)).to be true
|
||||
end
|
||||
|
||||
it 'should dereference the mutex' do
|
||||
mutex = subject.vm_mutex(vm)
|
||||
|
||||
subject.dereference_mutex(vm)
|
||||
|
||||
result = subject.vm_mutex(vm)
|
||||
expect(result).to_not eq(mutex)
|
||||
end
|
||||
end
|
||||
|
||||
describe 'sync_pool_template' do
|
||||
let(:old_template) { 'templates/old-template' }
|
||||
let(:new_template) { 'templates/new-template' }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue