@@ -295,63 +295,6 @@ describe('resource-publisher', () => {
295295 expect ( query [ 'token' ] [ 0 ] ) . toBe ( `{{${ authTokenName } }}` ) ;
296296 } ) ;
297297
298- it . skip ( 'should canonicalize backend credential named value references from overrides' , async ( ) => {
299- // TODO: Backend credentials can also use {{namedValue}} tokens (e.g., Authorization
300- // headers, API keys). Currently only Logger credentials are normalized. This test
301- // documents the gap and will pass once the normalization logic is extended to Backend.
302- // See: .squad/decisions/inbox/testengineer-named-value-coverage.md
303- const client = createMockClient ( ) ;
304- const store = createMockStore ( ) ;
305- const namedValueName = 'Backend-Auth-Token' ;
306- store . readResource . mockResolvedValue ( {
307- name : 'my-backend' ,
308- properties : {
309- url : 'https://api.example.com' ,
310- protocol : 'http' ,
311- credentials : {
312- header : {
313- Authorization : [ '{{old-token}}' ] ,
314- } ,
315- } ,
316- } ,
317- } ) ;
318- store . listResources . mockResolvedValue ( [
319- { type : ResourceType . Backend , nameParts : [ 'my-backend' ] } ,
320- { type : ResourceType . NamedValue , nameParts : [ namedValueName ] } ,
321- ] ) ;
322-
323- const configWithOverrides : PublishConfig = {
324- ...testConfig ,
325- overrides : {
326- backends : {
327- 'my-backend' : {
328- credentials : {
329- header : {
330- Authorization : [ `{{${ namedValueName . toLowerCase ( ) } }}` ] ,
331- } ,
332- } ,
333- } ,
334- } ,
335- } ,
336- } ;
337-
338- const descriptor : ResourceDescriptor = {
339- type : ResourceType . Backend ,
340- nameParts : [ 'my-backend' ] ,
341- } ;
342-
343- await publishResource ( client , store , testContext , descriptor , configWithOverrides ) ;
344-
345- const putCall = client . putResource . mock . calls [ 0 ] ;
346- const putJson = putCall [ 2 ] as Record < string , unknown > ;
347- const props = putJson . properties as Record < string , unknown > ;
348- const credentials = props . credentials as Record < string , unknown > ;
349- const header = credentials ?. header as Record < string , unknown > ;
350-
351- // This assertion will pass once Backend normalization is implemented
352- expect ( header ?. Authorization ) . toEqual ( [ `{{${ namedValueName } }}` ] ) ;
353- } ) ;
354-
355298 it ( 'should preserve opaque JSON properties' , async ( ) => {
356299 const client = createMockClient ( ) ;
357300 const store = createMockStore ( ) ;
0 commit comments