@@ -12,16 +12,16 @@ 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 end
2020
2121 RSpec . shared_examples 'mapping of instance metadata' do |instance_name |
2222 it 'maps service instance metadata attributes to files' do
23- expect ( service_binding_files . find { |f | f . path == "#{ directory } /instance-guid " } ) . to have_attributes ( content : instance . guid )
24- expect ( service_binding_files . find { |f | f . path == "#{ directory } /instance-name " } ) . to have_attributes ( content : instance_name || 'instance-name' )
23+ expect ( service_binding_files . find { |f | f . path == "#{ directory } /instance_guid " } ) . to have_attributes ( content : instance . guid )
24+ expect ( service_binding_files . find { |f | f . path == "#{ directory } /instance_name " } ) . to have_attributes ( content : instance_name || 'instance-name' )
2525 end
2626 end
2727
@@ -130,7 +130,7 @@ module VCAP::CloudController::Diego
130130 expect ( service_binding_files ) . not_to include ( have_attributes ( path : 'binding-name/volume_mounts' ) )
131131 end
132132
133- include_examples 'expected files' , %w[ type provider label binding-guid name binding-name instance-guid instance-name plan tags string number boolean array hash ]
133+ include_examples 'expected files' , %w[ type provider label binding_guid name binding_name instance_guid instance_name plan tags string number boolean array hash ]
134134
135135 context 'when binding_name is nil' do
136136 let ( :binding_name ) { nil }
@@ -143,14 +143,14 @@ module VCAP::CloudController::Diego
143143 include_examples 'mapping of tags'
144144 include_examples 'mapping of credentials'
145145
146- include_examples 'expected files' , %w[ type provider label binding-guid name instance-guid instance-name plan tags string number boolean array hash ]
146+ include_examples 'expected files' , %w[ type provider label binding_guid name instance_guid instance_name plan tags string number boolean array hash ]
147147 end
148148
149149 context 'when syslog_drain_url is set' do
150150 let ( :syslog_drain_url ) { 'https://syslog.drain' }
151151
152152 it 'maps the attribute to a file' do
153- expect ( service_binding_files . find { |f | f . path == 'binding-name/syslog-drain-url ' } ) . to have_attributes ( content : 'https://syslog.drain' )
153+ expect ( service_binding_files . find { |f | f . path == 'binding-name/syslog_drain_url ' } ) . to have_attributes ( content : 'https://syslog.drain' )
154154 end
155155
156156 include_examples 'mapping of type and provider'
@@ -161,7 +161,7 @@ module VCAP::CloudController::Diego
161161 include_examples 'mapping of credentials'
162162
163163 include_examples 'expected files' ,
164- %w[ type provider label binding-guid name binding-name instance-guid instance-name plan tags string number boolean array hash syslog-drain-url ]
164+ %w[ type provider label binding_guid name binding_name instance_guid instance_name plan tags string number boolean array hash syslog_drain_url ]
165165 end
166166
167167 context 'when volume_mounts is set' do
@@ -181,7 +181,7 @@ module VCAP::CloudController::Diego
181181
182182 it 'maps the attribute to a file' do
183183 expect ( service_binding_files . find do |f |
184- f . path == 'binding-name/volume-mounts '
184+ f . path == 'binding-name/volume_mounts '
185185 end ) . to have_attributes ( content : '[{"container_dir":"dir1","device_type":"type1","mode":"mode1"},{"container_dir":"dir2","device_type":"type2","mode":"mode2"}]' )
186186 end
187187
@@ -193,7 +193,7 @@ module VCAP::CloudController::Diego
193193 include_examples 'mapping of credentials'
194194
195195 include_examples 'expected files' ,
196- %w[ type provider label binding-guid name binding-name instance-guid instance-name plan tags string number boolean array hash volume-mounts ]
196+ %w[ type provider label binding_guid name binding_name instance_guid instance_name plan tags string number boolean array hash volume_mounts ]
197197 end
198198
199199 context 'when the instance is user-provided' do
@@ -205,7 +205,7 @@ module VCAP::CloudController::Diego
205205 include_examples 'mapping of tags' , '["an-upsi-tag","another-upsi-tag"]'
206206 include_examples 'mapping of credentials'
207207
208- include_examples 'expected files' , %w[ type provider label binding-guid name binding-name instance-guid instance-name tags string number boolean array hash ]
208+ include_examples 'expected files' , %w[ type provider label binding_guid name binding_name instance_guid instance_name tags string number boolean array hash ]
209209 end
210210
211211 context 'when there are duplicate keys at different levels' do
@@ -218,7 +218,7 @@ module VCAP::CloudController::Diego
218218 include_examples 'mapping of tags'
219219 include_examples 'mapping of credentials' , { credentials : '{"password":"secret"}' }
220220
221- include_examples 'expected files' , %w[ type provider label binding-guid name binding-name instance-guid instance-name plan tags credentials ]
221+ include_examples 'expected files' , %w[ type provider label binding_guid name binding_name instance_guid instance_name plan tags credentials ]
222222 end
223223
224224 context 'when there are duplicate binding names' do
0 commit comments