@@ -61,12 +61,6 @@ module VCAP::CloudController
61
61
let ( :droplet ) { DropletModel . make ( package_guid : package . guid , app_guid : staged_app . guid , state : DropletModel ::STAGING_STATE ) }
62
62
let ( :staging_guid ) { droplet . guid }
63
63
64
- before do
65
- @internal_user = 'internal_user'
66
- @internal_password = 'internal_password'
67
- authorize @internal_user , @internal_password
68
- end
69
-
70
64
context 'when it is a docker app' do
71
65
let ( :droplet ) { DropletModel . make ( :docker , package_guid : package . guid , app_guid : staged_app . guid , state : DropletModel ::STAGING_STATE ) }
72
66
@@ -197,46 +191,6 @@ module VCAP::CloudController
197
191
end
198
192
end
199
193
200
- describe 'authentication' do
201
- context 'when running in Kubernetes' do
202
- before do
203
- TestConfig . override ( kubernetes : { host_url : 'example.com' } )
204
- end
205
-
206
- context 'when missing authentication' do
207
- it 'succeeds' do
208
- header ( 'Authorization' , nil )
209
- post url , MultiJson . dump ( staging_response )
210
- expect ( last_response . status ) . to eq ( 200 )
211
- end
212
- end
213
- end
214
-
215
- context 'when missing authentication' do
216
- it 'fails with authentication required' do
217
- header ( 'Authorization' , nil )
218
- post url , staging_response
219
- expect ( last_response . status ) . to eq ( 401 )
220
- end
221
- end
222
-
223
- context 'when using invalid credentials' do
224
- it 'fails with authenticatiom required' do
225
- authorize 'bar' , 'foo'
226
- post url , staging_response
227
- expect ( last_response . status ) . to eq ( 401 )
228
- end
229
- end
230
-
231
- context 'when using valid credentials' do
232
- it 'succeeds' do
233
- allow_any_instance_of ( Diego ::Stager ) . to receive ( :staging_complete )
234
- post url , MultiJson . dump ( staging_response )
235
- expect ( last_response . status ) . to eq ( 200 )
236
- end
237
- end
238
- end
239
-
240
194
describe 'validation' do
241
195
context 'when sending invalid json' do
242
196
it 'fails with a 400' do
@@ -272,9 +226,6 @@ module VCAP::CloudController
272
226
end
273
227
274
228
before do
275
- @internal_user = 'internal_user'
276
- @internal_password = 'internal_password'
277
- authorize @internal_user , @internal_password
278
229
build . droplet = droplet
279
230
end
280
231
@@ -430,32 +381,6 @@ module VCAP::CloudController
430
381
end
431
382
end
432
383
433
- describe 'authentication' do
434
- context 'when missing authentication' do
435
- it 'fails with authentication required' do
436
- header ( 'Authorization' , nil )
437
- post url , staging_response
438
- expect ( last_response . status ) . to eq ( 401 )
439
- end
440
- end
441
-
442
- context 'when using invalid credentials' do
443
- it 'fails with authenticatiom required' do
444
- authorize 'bar' , 'foo'
445
- post url , staging_response
446
- expect ( last_response . status ) . to eq ( 401 )
447
- end
448
- end
449
-
450
- context 'when using valid credentials' do
451
- it 'succeeds' do
452
- allow_any_instance_of ( Diego ::Stager ) . to receive ( :staging_complete )
453
- post url , MultiJson . dump ( staging_response )
454
- expect ( last_response . status ) . to eq ( 200 )
455
- end
456
- end
457
- end
458
-
459
384
describe 'validation' do
460
385
context 'when sending invalid json' do
461
386
it 'fails with a 400' do
0 commit comments