@@ -12,9 +12,9 @@ module VCAP::CloudController::Diego
1212
1313 RSpec . shared_examples 'mapping of binding metadata' do |name |
1414 it 'maps service binding metadata attributes to files' do
15- expect ( service_binding_files . find { |f | f . path == "#{ directory } /binding-guid " } ) . to have_attributes ( content : binding . guid )
15+ expect ( service_binding_files . find { |f | f . path == "#{ directory } /binding_guid " } ) . to have_attributes ( content : binding . guid )
1616 expect ( service_binding_files . find { |f | f . path == "#{ directory } /name" } ) . to have_attributes ( content : name || 'binding-name' )
17- expect ( service_binding_files . find { |f | f . path == "#{ directory } /binding-name " } ) . to have_attributes ( content : 'binding-name' ) if name . nil?
17+ expect ( service_binding_files . find { |f | f . path == "#{ directory } /binding_name " } ) . to have_attributes ( content : 'binding-name' ) if name . nil?
1818 end
1919
2020 context 'when there are multiple bindings with the same name for the same app and service instance' do
@@ -48,8 +48,8 @@ module VCAP::CloudController::Diego
4848
4949 RSpec . shared_examples 'mapping of instance metadata' do |instance_name |
5050 it 'maps service instance metadata attributes to files' do
51- expect ( service_binding_files . find { |f | f . path == "#{ directory } /instance-guid " } ) . to have_attributes ( content : instance . guid )
52- expect ( service_binding_files . find { |f | f . path == "#{ directory } /instance-name " } ) . to have_attributes ( content : instance_name || 'instance-name' )
51+ expect ( service_binding_files . find { |f | f . path == "#{ directory } /instance_guid " } ) . to have_attributes ( content : instance . guid )
52+ expect ( service_binding_files . find { |f | f . path == "#{ directory } /instance_name " } ) . to have_attributes ( content : instance_name || 'instance-name' )
5353 end
5454 end
5555
@@ -166,7 +166,7 @@ module VCAP::CloudController::Diego
166166 expect ( service_binding_files ) . not_to include ( have_attributes ( path : 'binding-name/volume_mounts' ) )
167167 end
168168
169- include_examples 'expected files' , %w[ type provider label binding-guid name binding-name instance-guid instance-name plan tags string number boolean array hash ]
169+ include_examples 'expected files' , %w[ type provider label binding_guid name binding_name instance_guid instance_name plan tags string number boolean array hash ]
170170
171171 context 'when binding_name is nil' do
172172 let ( :binding_name ) { nil }
@@ -179,14 +179,14 @@ module VCAP::CloudController::Diego
179179 include_examples 'mapping of tags'
180180 include_examples 'mapping of credentials'
181181
182- include_examples 'expected files' , %w[ type provider label binding-guid name instance-guid instance-name plan tags string number boolean array hash ]
182+ include_examples 'expected files' , %w[ type provider label binding_guid name instance_guid instance_name plan tags string number boolean array hash ]
183183 end
184184
185185 context 'when syslog_drain_url is set' do
186186 let ( :syslog_drain_url ) { 'https://syslog.drain' }
187187
188188 it 'maps the attribute to a file' do
189- expect ( service_binding_files . find { |f | f . path == 'binding-name/syslog-drain-url ' } ) . to have_attributes ( content : 'https://syslog.drain' )
189+ expect ( service_binding_files . find { |f | f . path == 'binding-name/syslog_drain_url ' } ) . to have_attributes ( content : 'https://syslog.drain' )
190190 end
191191
192192 include_examples 'mapping of type and provider'
@@ -197,7 +197,7 @@ module VCAP::CloudController::Diego
197197 include_examples 'mapping of credentials'
198198
199199 include_examples 'expected files' ,
200- %w[ type provider label binding-guid name binding-name instance-guid instance-name plan tags string number boolean array hash syslog-drain-url ]
200+ %w[ type provider label binding_guid name binding_name instance_guid instance_name plan tags string number boolean array hash syslog_drain_url ]
201201 end
202202
203203 context 'when volume_mounts is set' do
@@ -217,7 +217,7 @@ module VCAP::CloudController::Diego
217217
218218 it 'maps the attribute to a file' do
219219 expect ( service_binding_files . find do |f |
220- f . path == 'binding-name/volume-mounts '
220+ f . path == 'binding-name/volume_mounts '
221221 end ) . to have_attributes ( content : '[{"container_dir":"dir1","device_type":"type1","mode":"mode1"},{"container_dir":"dir2","device_type":"type2","mode":"mode2"}]' )
222222 end
223223
@@ -229,7 +229,7 @@ module VCAP::CloudController::Diego
229229 include_examples 'mapping of credentials'
230230
231231 include_examples 'expected files' ,
232- %w[ type provider label binding-guid name binding-name instance-guid instance-name plan tags string number boolean array hash volume-mounts ]
232+ %w[ type provider label binding_guid name binding_name instance_guid instance_name plan tags string number boolean array hash volume_mounts ]
233233 end
234234
235235 context 'when the instance is user-provided' do
@@ -241,7 +241,7 @@ module VCAP::CloudController::Diego
241241 include_examples 'mapping of tags' , '["an-upsi-tag","another-upsi-tag"]'
242242 include_examples 'mapping of credentials'
243243
244- include_examples 'expected files' , %w[ type provider label binding-guid name binding-name instance-guid instance-name tags string number boolean array hash ]
244+ include_examples 'expected files' , %w[ type provider label binding_guid name binding_name instance_guid instance_name tags string number boolean array hash ]
245245 end
246246
247247 context 'when there are duplicate keys at different levels' do
@@ -254,7 +254,7 @@ module VCAP::CloudController::Diego
254254 include_examples 'mapping of tags'
255255 include_examples 'mapping of credentials' , { credentials : '{"password":"secret"}' }
256256
257- include_examples 'expected files' , %w[ type provider label binding-guid name binding-name instance-guid instance-name plan tags credentials ]
257+ include_examples 'expected files' , %w[ type provider label binding_guid name binding_name instance_guid instance_name plan tags credentials ]
258258 end
259259
260260 context 'when there are duplicate binding names' do
0 commit comments