File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -390,4 +390,42 @@ describe('Updater', () => {
390390 ] )
391391 } )
392392 } )
393+
394+ describe ( 'when given a tenant-id and client-id in credentials' , ( ) => {
395+ const jobDetails = { ...mockJobDetails }
396+
397+ new Updater (
398+ 'MOCK_UPDATER_IMAGE_NAME' ,
399+ 'MOCK_PROXY_IMAGE_NAME' ,
400+ mockApiClient ,
401+ jobDetails ,
402+ [
403+ {
404+ type : 'git_source' ,
405+ host : 'github.com' ,
406+ username : 'user' ,
407+ password : 'pass'
408+ } ,
409+ {
410+ type : 'npm_registry' ,
411+ host : 'registry.npmjs.org' ,
412+ 'tenant-id' : '12345678-1234-1234-1234-123456789012' ,
413+ 'client-id' : '87654321-4321-4321-4321-210987654321'
414+ }
415+ ]
416+ )
417+
418+ it ( 'they are excluded from the credentials metadata' , ( ) => {
419+ expect ( jobDetails [ 'credentials-metadata' ] ) . toEqual ( [
420+ {
421+ type : 'git_source' ,
422+ host : 'github.com'
423+ } ,
424+ {
425+ type : 'npm_registry' ,
426+ host : 'registry.npmjs.org'
427+ }
428+ ] )
429+ } )
430+ } )
393431} )
Original file line number Diff line number Diff line change @@ -39,6 +39,8 @@ export type Credential = {
3939 'replaces-base' ?: boolean
4040 'public-key-fingerprint' ?: string
4141 'auth-key' ?: string
42+ 'tenant-id' ?: string
43+ 'client-id' ?: string
4244}
4345
4446export type Metric = {
You can’t perform that action at this time.
0 commit comments