@@ -161,7 +161,7 @@ public void testVcapServicesWithDatabaseService() {
161161 }
162162 ]
163163}
164- """ ;
164+ """ ;
165165
166166 environment
167167 .getPropertySources ()
@@ -236,25 +236,25 @@ public void testVcapServicesWithDatabaseServiceNoSsl() {
236236 public void testVcapServicesWithClientCertCredentialMapping () {
237237 String vcapServices =
238238 """
239- {
240- "postgresql-db": [
241- {
242- "label": "postgresql-db",
243- "name": "autoscaler-db",
244- "tags": ["relational", "binding_db"],
245- "credentials": {
246- "username": "dbuser",
247- "password": "dbpass",
248- "hostname": "db-host.example.com",
249- "dbname": "autoscaler_db",
250- "port": "5432",
251- "client_cert": "-----BEGIN CERTIFICATE-----\\ nMIICert...\\ n-----END CERTIFICATE-----",
252- "client_key": "-----BEGIN PRIVATE KEY-----\\ nMIIKey...\\ n-----END PRIVATE KEY-----",
253- "sslrootcert": "-----BEGIN CERTIFICATE-----\\ nMIIRoot...\\ n-----END CERTIFICATE-----"
254- }
255- }
256- ]
257- }
239+ {
240+ "postgresql-db": [
241+ {
242+ "label": "postgresql-db",
243+ "name": "autoscaler-db",
244+ "tags": ["relational", "binding_db"],
245+ "credentials": {
246+ "username": "dbuser",
247+ "password": "dbpass",
248+ "hostname": "db-host.example.com",
249+ "dbname": "autoscaler_db",
250+ "port": "5432",
251+ "client_cert": "-----BEGIN CERTIFICATE-----\\ nMIICert...\\ n-----END CERTIFICATE-----",
252+ "client_key": "-----BEGIN PRIVATE KEY-----\\ nMIIKey...\\ n-----END PRIVATE KEY-----",
253+ "sslrootcert": "-----BEGIN CERTIFICATE-----\\ nMIIRoot...\\ n-----END CERTIFICATE-----"
254+ }
255+ }
256+ ]
257+ }
258258 """ ;
259259
260260 environment
@@ -280,23 +280,23 @@ public void testVcapServicesWithClientCertCredentialMapping() {
280280 public void testVcapServicesWithClientCertOnlyCredentialMapping () {
281281 String vcapServices =
282282 """
283- {
284- "postgresql-db": [
285- {
286- "label": "postgresql-db",
287- "name": "autoscaler-db",
288- "tags": ["relational", "binding_db"],
289- "credentials": {
290- "username": "dbuser",
291- "password": "dbpass",
292- "hostname": "db-host.example.com",
293- "dbname": "autoscaler_db",
294- "port": "5432",
295- "client_cert": "-----BEGIN CERTIFICATE-----\\ nMIICert...\\ n-----END CERTIFICATE-----"
296- }
297- }
298- ]
299- }
283+ {
284+ "postgresql-db": [
285+ {
286+ "label": "postgresql-db",
287+ "name": "autoscaler-db",
288+ "tags": ["relational", "binding_db"],
289+ "credentials": {
290+ "username": "dbuser",
291+ "password": "dbpass",
292+ "hostname": "db-host.example.com",
293+ "dbname": "autoscaler_db",
294+ "port": "5432",
295+ "client_cert": "-----BEGIN CERTIFICATE-----\\ nMIICert...\\ n-----END CERTIFICATE-----"
296+ }
297+ }
298+ ]
299+ }
300300 """ ;
301301
302302 environment
@@ -317,26 +317,26 @@ public void testVcapServicesWithClientCertOnlyCredentialMapping() {
317317 public void testVcapServicesPrefersSslcertOverClientCert () {
318318 String vcapServices =
319319 """
320- {
321- "postgresql-db": [
322- {
323- "label": "postgresql-db",
324- "name": "autoscaler-db",
325- "tags": ["relational", "binding_db"],
326- "credentials": {
327- "username": "dbuser",
328- "password": "dbpass",
329- "hostname": "db-host.example.com",
330- "dbname": "autoscaler_db",
331- "port": "5432",
332- "sslcert": "-----BEGIN CERTIFICATE-----\\ nMIISSLCert...\\ n-----END CERTIFICATE-----",
333- "sslkey": "-----BEGIN PRIVATE KEY-----\\ nMIISSLKey...\\ n-----END PRIVATE KEY-----",
334- "client_cert": "-----BEGIN CERTIFICATE-----\\ nMIICert...\\ n-----END CERTIFICATE-----",
335- "client_key": "-----BEGIN PRIVATE KEY-----\\ nMIIKey...\\ n-----END PRIVATE KEY-----"
336- }
337- }
338- ]
339- }
320+ {
321+ "postgresql-db": [
322+ {
323+ "label": "postgresql-db",
324+ "name": "autoscaler-db",
325+ "tags": ["relational", "binding_db"],
326+ "credentials": {
327+ "username": "dbuser",
328+ "password": "dbpass",
329+ "hostname": "db-host.example.com",
330+ "dbname": "autoscaler_db",
331+ "port": "5432",
332+ "sslcert": "-----BEGIN CERTIFICATE-----\\ nMIISSLCert...\\ n-----END CERTIFICATE-----",
333+ "sslkey": "-----BEGIN PRIVATE KEY-----\\ nMIISSLKey...\\ n-----END PRIVATE KEY-----",
334+ "client_cert": "-----BEGIN CERTIFICATE-----\\ nMIICert...\\ n-----END CERTIFICATE-----",
335+ "client_key": "-----BEGIN PRIVATE KEY-----\\ nMIIKey...\\ n-----END PRIVATE KEY-----"
336+ }
337+ }
338+ ]
339+ }
340340 """ ;
341341
342342 environment
@@ -358,7 +358,20 @@ public void testVcapApplicationWithOrgGuid() {
358358 String vcapServices =
359359 """
360360 {
361- "user-provided": []
361+ "user-provided": [
362+ {
363+ "name": "scheduler-config-service",
364+ "tags": ["scheduler-config"],
365+ "credentials": {
366+ "cfserver": {
367+ "healthserver": {
368+ "username": "health-user",
369+ "password": "health-password"
370+ }
371+ }
372+ }
373+ }
374+ ]
362375 }
363376 """ ;
364377
@@ -392,7 +405,20 @@ public void testVcapApplicationWithoutOrgGuid() {
392405 String vcapServices =
393406 """
394407 {
395- "user-provided": []
408+ "user-provided": [
409+ {
410+ "name": "scheduler-config-service",
411+ "tags": ["scheduler-config"],
412+ "credentials": {
413+ "cfserver": {
414+ "healthserver": {
415+ "username": "health-user",
416+ "password": "health-password"
417+ }
418+ }
419+ }
420+ }
421+ ]
396422 }
397423 """ ;
398424
@@ -546,7 +572,20 @@ public void testVcapApplicationWithOnlySpaceGuid() {
546572 String vcapServices =
547573 """
548574 {
549- "user-provided": []
575+ "user-provided": [
576+ {
577+ "name": "scheduler-config-service",
578+ "tags": ["scheduler-config"],
579+ "credentials": {
580+ "cfserver": {
581+ "healthserver": {
582+ "username": "health-user",
583+ "password": "health-password"
584+ }
585+ }
586+ }
587+ }
588+ ]
550589 }
551590 """ ;
552591
@@ -579,7 +618,20 @@ public void testVcapApplicationWithEmptySpaceGuid() {
579618 String vcapServices =
580619 """
581620 {
582- "user-provided": []
621+ "user-provided": [
622+ {
623+ "name": "scheduler-config-service",
624+ "tags": ["scheduler-config"],
625+ "credentials": {
626+ "cfserver": {
627+ "healthserver": {
628+ "username": "health-user",
629+ "password": "health-password"
630+ }
631+ }
632+ }
633+ }
634+ ]
583635 }
584636 """ ;
585637
@@ -613,10 +665,22 @@ public void testVcapApplicationWithoutSpaceGuid() {
613665 String vcapServices =
614666 """
615667 {
616- "user-provided": []
668+ "user-provided": [
669+ {
670+ "name": "scheduler-config-service",
671+ "tags": ["scheduler-config"],
672+ "credentials": {
673+ "cfserver": {
674+ "healthserver": {
675+ "username": "health-user",
676+ "password": "health-password"
677+ }
678+ }
679+ }
680+ }
681+ ]
617682 }
618683 """ ;
619-
620684 String vcapApplication =
621685 """
622686 {
0 commit comments