mirror of
https://github.com/puppetlabs/vmpooler-provider-vsphere.git
synced 2026-03-26 23:47:43 -04:00
Update connect_to_vsphere specs to expect read_timeout and open_timeout args
This commit is contained in:
parent
bbf26502b9
commit
a10e06bcfa
1 changed files with 18 additions and 12 deletions
|
|
@ -1334,10 +1334,12 @@ EOT
|
||||||
context 'successful connection' do
|
context 'successful connection' do
|
||||||
it 'should use the supplied credentials' do
|
it 'should use the supplied credentials' do
|
||||||
expect(RbVmomi::VIM).to receive(:connect).with({
|
expect(RbVmomi::VIM).to receive(:connect).with({
|
||||||
:host => credentials['server'],
|
:host => credentials['server'],
|
||||||
:user => credentials['username'],
|
:user => credentials['username'],
|
||||||
:password => credentials['password'],
|
:password => credentials['password'],
|
||||||
:insecure => credentials['insecure']
|
:insecure => credentials['insecure'],
|
||||||
|
:read_timeout => 60,
|
||||||
|
:open_timeout => 60
|
||||||
}).and_return(connection)
|
}).and_return(connection)
|
||||||
subject.connect_to_vsphere
|
subject.connect_to_vsphere
|
||||||
end
|
end
|
||||||
|
|
@ -1346,10 +1348,12 @@ EOT
|
||||||
config[:providers][:vsphere][:insecure] = true
|
config[:providers][:vsphere][:insecure] = true
|
||||||
|
|
||||||
expect(RbVmomi::VIM).to receive(:connect).with({
|
expect(RbVmomi::VIM).to receive(:connect).with({
|
||||||
:host => credentials['server'],
|
:host => credentials['server'],
|
||||||
:user => credentials['username'],
|
:user => credentials['username'],
|
||||||
:password => credentials['password'],
|
:password => credentials['password'],
|
||||||
:insecure => true,
|
:insecure => true,
|
||||||
|
:read_timeout => 60,
|
||||||
|
:open_timeout => 60
|
||||||
}).and_return(connection)
|
}).and_return(connection)
|
||||||
subject.connect_to_vsphere
|
subject.connect_to_vsphere
|
||||||
end
|
end
|
||||||
|
|
@ -1358,10 +1362,12 @@ EOT
|
||||||
config[:providers][:vsphere][:insecure] = nil
|
config[:providers][:vsphere][:insecure] = nil
|
||||||
|
|
||||||
expect(RbVmomi::VIM).to receive(:connect).with({
|
expect(RbVmomi::VIM).to receive(:connect).with({
|
||||||
:host => credentials['server'],
|
:host => credentials['server'],
|
||||||
:user => credentials['username'],
|
:user => credentials['username'],
|
||||||
:password => credentials['password'],
|
:password => credentials['password'],
|
||||||
:insecure => true
|
:insecure => true,
|
||||||
|
:read_timeout => 60,
|
||||||
|
:open_timeout => 60
|
||||||
}).and_return(connection)
|
}).and_return(connection)
|
||||||
|
|
||||||
subject.connect_to_vsphere
|
subject.connect_to_vsphere
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue