1414 auth_password : 'internal_password'
1515 } ,
1616 internal_service_hostname : 'api.internal.cf' ,
17+ internal_service_port : '9090' ,
1718 kubernetes : kubernetes_config ,
1819 )
1920 end
2021 let ( :eirini_url ) { 'http://eirini.loves.heimdall:777' }
2122 let ( :staging_guid ) { 'some_staging_guid' }
2223 let ( :kubernetes_config ) { { } }
2324
24- let ( :staging_details ) { stub_staging_details ( lifecycle_type ) }
25+ let ( :staging_details ) { stub_staging_details ( lifecycle_type , staging_guid ) }
2526 let ( :lifecycle_data ) { stub_lifecycle_data }
2627
2728 let ( :lifecycle_environment_variables ) { [
7273 environment : [ { name : 'VCAP_APPLICATION' , value : '{"wow":"pants"}' } ,
7374 { name : 'MEMORY_LIMIT' , value : '256m' } ,
7475 { name : 'VCAP_SERVICES' , value : '{}' } ] ,
75- completion_callback : 'https://internal_user:internal_password@api.internal.cf:8182/internal/v3/staging//build_completed?start=' ,
76+ completion_callback : 'https://internal_user:internal_password@api.internal.cf:8182/internal/v3/staging/some_staging_guid /build_completed?start=' ,
7677 lifecycle : {
7778 buildpack_lifecycle : {
7879 droplet_upload_uri : "http://cc-uploader.service.cf.internal:9091/v1/droplet/#{ staging_guid } ?cc-droplet-upload-uri=http://upload.me" ,
110111 { name : 'VCAP_APPLICATION' , value : '{"wow":"pants"}' } ,
111112 { name : 'MEMORY_LIMIT' , value : '256m' } ,
112113 { name : 'VCAP_SERVICES' , value : '{}' } ] ,
113- completion_callback : 'https://internal_user:internal_password@api.internal.cf:8182/internal/v3/staging//build_completed?start=' ,
114+ completion_callback : 'https://internal_user:internal_password@api.internal.cf:8182/internal/v3/staging/some_staging_guid /build_completed?start=' ,
114115 lifecycle : {
115116 buildpack_lifecycle : {
116117 droplet_upload_uri : "http://cc-uploader.service.cf.internal:9091/v1/droplet/#{ staging_guid } ?cc-droplet-upload-uri=http://upload.me" ,
174175 environment : [ { name : 'VCAP_APPLICATION' , value : '{"wow":"pants"}' } ,
175176 { name : 'MEMORY_LIMIT' , value : '256m' } ,
176177 { name : 'VCAP_SERVICES' , value : '{}' } ] ,
177- completion_callback : 'https://internal_user:internal_password@api.internal.cf:8182/internal/v3/staging//build_completed?start=' ,
178+ completion_callback : 'https://internal_user:internal_password@api.internal.cf:8182/internal/v3/staging/some_staging_guid /build_completed?start=' ,
178179 lifecycle : {
179180 docker_lifecycle : {
180181 image : 'docker.io/some/image' ,
200201 stager_client . stage ( staging_guid , staging_details )
201202 expect ( WebMock ) . to have_requested ( :post , "#{ eirini_url } /stage/#{ staging_guid } " ) . with { |req |
202203 parsed_json = JSON . parse ( req . body )
203- parsed_json [ 'completion_callback' ] == 'http://internal_user:internal_password@api.internal.cf:80 /internal/v3/staging//build_completed?start='
204+ parsed_json [ 'completion_callback' ] == 'http://internal_user:internal_password@api.internal.cf:9090 /internal/v3/staging/some_staging_guid /build_completed?start='
204205 }
205206 end
206207 end
217218 end
218219 end
219220
220- def stub_staging_details ( lifecycle_type )
221+ def stub_staging_details ( lifecycle_type , staging_guid )
221222 space = VCAP ::CloudController ::Space . make (
222223 name : 'outer' ,
223224 guid : 'outer-guid' ,
@@ -240,6 +241,7 @@ def stub_staging_details(lifecycle_type)
240241 staging_details . lifecycle = double ( type : lifecycle_type )
241242 staging_details . staging_disk_in_mb = 100
242243 staging_details . staging_memory_in_mb = 200
244+ staging_details . staging_guid = staging_guid
243245 staging_details
244246 end
245247
0 commit comments