Skip to content

Commit 46014b3

Browse files
Michael Mokryszameowlia
authored andcommitted
Fix hostname property name in nats link test
We use both 'host' and 'hostname' in different places to store the same data. This led to some mistakes in the testsuite. This commit fixes the last mistaken use of 'host' in the NATS bosh link.
1 parent 04b9a38 commit 46014b3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

spec/route_registar_templates_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@
203203
name: 'nats',
204204
properties: {
205205
'nats' => {
206-
'host' => 'nats-host', 'user' => 'nats-user', 'password' => 'nats-password', 'port' => 8080
206+
'hostname' => 'nats-host', 'user' => 'nats-user', 'password' => 'nats-password', 'port' => 8080
207207
}
208208
},
209209
instances: [Bosh::Template::Test::LinkInstance.new(address: 'my-nats-address')]
@@ -214,7 +214,7 @@
214214
describe 'nats properties' do
215215
it 'renders with the default' do
216216
rendered_hash = JSON.parse(template.render(merged_manifest_properties, consumes: links))
217-
expect(rendered_hash['message_bus_servers'][0]['host']).to eq('my-nats-address:8080')
217+
expect(rendered_hash['message_bus_servers'][0]['host']).to eq('nats-host:8080')
218218
expect(rendered_hash['message_bus_servers'][0]['user']).to eq('nats-user')
219219
expect(rendered_hash['message_bus_servers'][0]['password']).to eq('nats-password')
220220
end
@@ -285,7 +285,7 @@
285285
name: 'nats',
286286
properties: {
287287
'nats' => {
288-
'host' => '', 'user' => '', 'password' => '', 'port' => 8080
288+
'hostname' => '', 'user' => '', 'password' => '', 'port' => 8080
289289
}
290290
}
291291
)
@@ -318,7 +318,7 @@
318318
rendered_hash = JSON.parse(template.render(merged_manifest_properties, consumes: links))
319319
expect(rendered_hash).to eq(
320320
'host' => '192.168.0.0',
321-
'message_bus_servers' => [{ 'host' => 'my-nats-address:8080', 'password' => 'nats-password', 'user' => 'nats-user' }],
321+
'message_bus_servers' => [{ 'host' => 'nats-host:8080', 'password' => 'nats-password', 'user' => 'nats-user' }],
322322
'routes' => [
323323
{
324324
'health_check' => { 'name' => 'uaa-healthcheck', 'script_path' => '/var/vcap/jobs/uaa/bin/health_check' },

0 commit comments

Comments
 (0)