@@ -59,7 +59,7 @@ describe('createDcmProxy', () => {
5959 fetchSpy ?. mockRestore ( ) ;
6060 } ) ;
6161
62- it ( 'returns 503 when dcm.apiGatewayUrl is not configured' , async ( ) => {
62+ it ( 'returns 503 when dcm.apiUrl is not configured' , async ( ) => {
6363 const app = makeApp ( { dcm : { clientId : 'id' , clientSecret : 'secret' } } ) ;
6464
6565 const res = await request ( app ) . get ( '/proxy/providers' ) ;
@@ -77,7 +77,7 @@ describe('createDcmProxy', () => {
7777
7878 const app = makeApp ( {
7979 dcm : {
80- apiGatewayUrl : 'https://gateway .example.com' ,
80+ apiUrl : 'https://control-plane .example.com' ,
8181 clientId : 'id' ,
8282 clientSecret : 'secret' ,
8383 } ,
@@ -101,7 +101,7 @@ describe('createDcmProxy', () => {
101101
102102 const app = makeApp ( {
103103 dcm : {
104- apiGatewayUrl : 'https://gateway .example.com' ,
104+ apiUrl : 'https://control-plane .example.com' ,
105105 clientId : 'id' ,
106106 clientSecret : 'secret' ,
107107 } ,
@@ -111,7 +111,7 @@ describe('createDcmProxy', () => {
111111
112112 expect ( res . status ) . toBe ( 502 ) ;
113113 expect ( res . body ) . toMatchObject ( {
114- error : expect . stringContaining ( 'DCM API gateway ' ) ,
114+ error : expect . stringContaining ( 'DCM API' ) ,
115115 } ) ;
116116 } ) ;
117117
@@ -134,7 +134,7 @@ describe('createDcmProxy', () => {
134134
135135 const app = makeApp ( {
136136 dcm : {
137- apiGatewayUrl : 'https://gateway .example.com' ,
137+ apiUrl : 'https://control-plane .example.com' ,
138138 clientId : 'id' ,
139139 clientSecret : 'secret' ,
140140 } ,
@@ -171,7 +171,7 @@ describe('createDcmProxy', () => {
171171
172172 const app = makeApp ( {
173173 dcm : {
174- apiGatewayUrl : 'https://gateway .example.com' ,
174+ apiUrl : 'https://control-plane .example.com' ,
175175 clientId : 'id' ,
176176 clientSecret : 'secret' ,
177177 } ,
@@ -206,7 +206,7 @@ describe('createDcmProxy', () => {
206206
207207 const app = makeApp ( {
208208 dcm : {
209- apiGatewayUrl : 'https://gateway .example.com' ,
209+ apiUrl : 'https://control-plane .example.com' ,
210210 clientId : 'id' ,
211211 clientSecret : 'secret' ,
212212 } ,
@@ -227,7 +227,7 @@ describe('createDcmProxy', () => {
227227 expect ( JSON . parse ( upstreamCall [ 1 ] . body ) ) . toEqual ( patch ) ;
228228 } ) ;
229229
230- it ( 'handles 204 No Content upstream responses without a body ' , async ( ) => {
230+ it ( 'falls back to legacy dcm.apiGatewayUrl and handles 204 No Content ' , async ( ) => {
231231 fetchSpy = jest
232232 . spyOn ( globalThis , 'fetch' )
233233 . mockResolvedValueOnce ( TOKEN_RESPONSE )
0 commit comments