mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-27 10:28:41 -05:00
Fixup spec for pool_check_response
This commit is contained in:
parent
a78d65137d
commit
8c79acd02d
1 changed files with 4 additions and 8 deletions
|
|
@ -2221,25 +2221,21 @@ EOT
|
||||||
subject._check_pool(pool_object, provider)
|
subject._check_pool(pool_object, provider)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'passes #create_inventory errors correctly' do
|
it 'captures #create_inventory errors correctly' do
|
||||||
allow(subject).to receive(:create_inventory).and_raise(
|
allow(subject).to receive(:create_inventory).and_raise(
|
||||||
RuntimeError,'Mock Error'
|
RuntimeError,'Mock Error'
|
||||||
)
|
)
|
||||||
expect {
|
expect {
|
||||||
subject._check_pool(pool_object, provider)
|
subject._check_pool(pool_object, provider)
|
||||||
}.to raise_error(RuntimeError, /Mock Error/)
|
}.to_not raise_error(RuntimeError, /Mock Error/)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should not perform any other actions if an error occurs' do
|
it 'should return early if an error occurs' do
|
||||||
allow(subject).to receive(:create_inventory).and_raise(
|
allow(subject).to receive(:create_inventory).and_raise(
|
||||||
RuntimeError,'Mock Error'
|
RuntimeError,'Mock Error'
|
||||||
)
|
)
|
||||||
|
|
||||||
expect {
|
|
||||||
subject._check_pool(pool_object, provider)
|
|
||||||
}.to raise_error(RuntimeError, /Mock Error/)
|
|
||||||
|
|
||||||
expect(subject).to_not receive(:check_running_pool_vms)
|
expect(subject).to_not receive(:check_running_pool_vms)
|
||||||
|
subject._check_pool(pool_object, provider)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should return that no actions were taken' do
|
it 'should return that no actions were taken' do
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue