Skip to content

Commit c669c7a

Browse files
committed
Previously we were using ping or just an ssh connection to validate a
deployed VM. Now we are verifying that the agent id matches the deployed VM by comparing the agent id returned from a 'bosh vms --details' command along with the 'hostname' of the deployed VM (which should be the agend id). Additionally, another concern of the previous approach was that it used ping when the port isn't guaranteed to be open, unlike SSH. [#107224760](https://www.pivotaltracker.com/story/show/107224760)
1 parent f6fb0db commit c669c7a

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

spec/system/with_release_stemcell_spec.rb

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,19 @@ def matchdata_to_h(matchdata)
119119
it 'should have network access to the vm using the manual static ip' do
120120
skip "not applicable for dynamic networking" if dynamic_networking?
121121

122-
expect(static_ip).not_to be_nil
123-
expect(ssh_sudo(director_ip, 'vcap', "ping -qc1 #{static_ip}; echo $?", ssh_options)).to end_with("0\n")
122+
vm = wait_for_vm('colocated/0')
123+
expect(vm).to_not be_nil
124+
expect(static_ip).to_not be_nil
125+
expect(ssh(public_ip, 'vcap', 'hostname', @our_ssh_options)).to match /#{vm[:agent_id]}/
124126
end
125127

126128
it 'should have network access to the vm using the vip' do
127129
skip "vip network isn't supported" unless includes_vip?
128130

129-
expect(vip).not_to be_nil
130-
expect(ssh(vip, 'vcap', '/sbin/ifconfig eth0', @our_ssh_options)).to match /#{static_ip}/
131+
vm = wait_for_vm('colocated/0')
132+
expect(vm).to_not be_nil
133+
expect(vip).to_not be_nil
134+
expect(ssh(vip, 'vcap', 'hostname', @our_ssh_options)).to match /#{vm[:agent_id]}/
131135
end
132136

133137
context 'changing the persistent disk size' do

0 commit comments

Comments
 (0)