From a10e06bcfa92909f15803899e1ac3993cee6a883 Mon Sep 17 00:00:00 2001 From: Mahima Singh <105724608+smahima27@users.noreply.github.com> Date: Tue, 17 Mar 2026 12:22:35 +0530 Subject: [PATCH] Update connect_to_vsphere specs to expect read_timeout and open_timeout args --- spec/unit/providers/vsphere_spec.rb | 30 +++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/spec/unit/providers/vsphere_spec.rb b/spec/unit/providers/vsphere_spec.rb index 893b545..99957cb 100644 --- a/spec/unit/providers/vsphere_spec.rb +++ b/spec/unit/providers/vsphere_spec.rb @@ -1334,10 +1334,12 @@ EOT context 'successful connection' do it 'should use the supplied credentials' do expect(RbVmomi::VIM).to receive(:connect).with({ - :host => credentials['server'], - :user => credentials['username'], - :password => credentials['password'], - :insecure => credentials['insecure'] + :host => credentials['server'], + :user => credentials['username'], + :password => credentials['password'], + :insecure => credentials['insecure'], + :read_timeout => 60, + :open_timeout => 60 }).and_return(connection) subject.connect_to_vsphere end @@ -1346,10 +1348,12 @@ EOT config[:providers][:vsphere][:insecure] = true expect(RbVmomi::VIM).to receive(:connect).with({ - :host => credentials['server'], - :user => credentials['username'], - :password => credentials['password'], - :insecure => true, + :host => credentials['server'], + :user => credentials['username'], + :password => credentials['password'], + :insecure => true, + :read_timeout => 60, + :open_timeout => 60 }).and_return(connection) subject.connect_to_vsphere end @@ -1358,10 +1362,12 @@ EOT config[:providers][:vsphere][:insecure] = nil expect(RbVmomi::VIM).to receive(:connect).with({ - :host => credentials['server'], - :user => credentials['username'], - :password => credentials['password'], - :insecure => true + :host => credentials['server'], + :user => credentials['username'], + :password => credentials['password'], + :insecure => true, + :read_timeout => 60, + :open_timeout => 60 }).and_return(connection) subject.connect_to_vsphere