mirror of
https://github.com/puppetlabs/vmpooler.git
synced 2026-01-26 18:08:42 -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)
|
||||
end
|
||||
|
||||
it 'passes #create_inventory errors correctly' do
|
||||
it 'captures #create_inventory errors correctly' do
|
||||
allow(subject).to receive(:create_inventory).and_raise(
|
||||
RuntimeError,'Mock Error'
|
||||
)
|
||||
expect {
|
||||
subject._check_pool(pool_object, provider)
|
||||
}.to raise_error(RuntimeError, /Mock Error/)
|
||||
}.to_not raise_error(RuntimeError, /Mock Error/)
|
||||
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(
|
||||
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)
|
||||
subject._check_pool(pool_object, provider)
|
||||
end
|
||||
|
||||
it 'should return that no actions were taken' do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue