14
14
auth_password : 'internal_password'
15
15
} ,
16
16
internal_service_hostname : 'api.internal.cf' ,
17
+ internal_service_port : '9090' ,
17
18
kubernetes : kubernetes_config ,
18
19
)
19
20
end
20
21
let ( :eirini_url ) { 'http://eirini.loves.heimdall:777' }
21
22
let ( :staging_guid ) { 'some_staging_guid' }
22
23
let ( :kubernetes_config ) { { } }
23
24
24
- let ( :staging_details ) { stub_staging_details ( lifecycle_type ) }
25
+ let ( :staging_details ) { stub_staging_details ( lifecycle_type , staging_guid ) }
25
26
let ( :lifecycle_data ) { stub_lifecycle_data }
26
27
27
28
let ( :lifecycle_environment_variables ) { [
72
73
environment : [ { name : 'VCAP_APPLICATION' , value : '{"wow":"pants"}' } ,
73
74
{ name : 'MEMORY_LIMIT' , value : '256m' } ,
74
75
{ name : 'VCAP_SERVICES' , value : '{}' } ] ,
75
- completion_callback :
'https://internal_user:[email protected] :8182/internal/v3/staging//build_completed?start=' ,
76
+ completion_callback :
'https://internal_user:[email protected] :8182/internal/v3/staging/some_staging_guid /build_completed?start=' ,
76
77
lifecycle : {
77
78
buildpack_lifecycle : {
78
79
droplet_upload_uri : "http://cc-uploader.service.cf.internal:9091/v1/droplet/#{ staging_guid } ?cc-droplet-upload-uri=http://upload.me" ,
110
111
{ name : 'VCAP_APPLICATION' , value : '{"wow":"pants"}' } ,
111
112
{ name : 'MEMORY_LIMIT' , value : '256m' } ,
112
113
{ name : 'VCAP_SERVICES' , value : '{}' } ] ,
113
- completion_callback :
'https://internal_user:[email protected] :8182/internal/v3/staging//build_completed?start=' ,
114
+ completion_callback :
'https://internal_user:[email protected] :8182/internal/v3/staging/some_staging_guid /build_completed?start=' ,
114
115
lifecycle : {
115
116
buildpack_lifecycle : {
116
117
droplet_upload_uri : "http://cc-uploader.service.cf.internal:9091/v1/droplet/#{ staging_guid } ?cc-droplet-upload-uri=http://upload.me" ,
174
175
environment : [ { name : 'VCAP_APPLICATION' , value : '{"wow":"pants"}' } ,
175
176
{ name : 'MEMORY_LIMIT' , value : '256m' } ,
176
177
{ name : 'VCAP_SERVICES' , value : '{}' } ] ,
177
- completion_callback :
'https://internal_user:[email protected] :8182/internal/v3/staging//build_completed?start=' ,
178
+ completion_callback :
'https://internal_user:[email protected] :8182/internal/v3/staging/some_staging_guid /build_completed?start=' ,
178
179
lifecycle : {
179
180
docker_lifecycle : {
180
181
image : 'docker.io/some/image' ,
200
201
stager_client . stage ( staging_guid , staging_details )
201
202
expect ( WebMock ) . to have_requested ( :post , "#{ eirini_url } /stage/#{ staging_guid } " ) . with { |req |
202
203
parsed_json = JSON . parse ( req . body )
203
- parsed_json [ 'completion_callback' ] ==
'http://internal_user:[email protected] :80 /internal/v3/staging//build_completed?start='
204
+ parsed_json [ 'completion_callback' ] ==
'http://internal_user:[email protected] :9090 /internal/v3/staging/some_staging_guid /build_completed?start='
204
205
}
205
206
end
206
207
end
217
218
end
218
219
end
219
220
220
- def stub_staging_details ( lifecycle_type )
221
+ def stub_staging_details ( lifecycle_type , staging_guid )
221
222
space = VCAP ::CloudController ::Space . make (
222
223
name : 'outer' ,
223
224
guid : 'outer-guid' ,
@@ -240,6 +241,7 @@ def stub_staging_details(lifecycle_type)
240
241
staging_details . lifecycle = double ( type : lifecycle_type )
241
242
staging_details . staging_disk_in_mb = 100
242
243
staging_details . staging_memory_in_mb = 200
244
+ staging_details . staging_guid = staging_guid
243
245
staging_details
244
246
end
245
247
0 commit comments