@@ -80,12 +80,12 @@ describe('integration: add and remove resources', () => {
8080 } ) ;
8181 } ) ;
8282
83- describe ( 'identity lifecycle' , ( ) => {
84- const identityName = `IntegId${ Date . now ( ) . toString ( ) . slice ( - 6 ) } ` ;
83+ describe ( 'credential lifecycle' , ( ) => {
84+ const credentialName = `IntegId${ Date . now ( ) . toString ( ) . slice ( - 6 ) } ` ;
8585
86- it ( 'adds an identity resource' , async ( ) => {
86+ it ( 'adds a credential resource' , async ( ) => {
8787 const result = await runCLI (
88- [ 'add' , 'identity ' , '--name' , identityName , '--api-key' , 'test-key-integ-123' , '--json' ] ,
88+ [ 'add' , 'credential ' , '--name' , credentialName , '--api-key' , 'test-key-integ-123' , '--json' ] ,
8989 project . projectPath
9090 ) ;
9191
@@ -97,12 +97,12 @@ describe('integration: add and remove resources', () => {
9797 const config = await readProjectConfig ( project . projectPath ) ;
9898 const credentials = config . credentials as Record < string , unknown > [ ] | undefined ;
9999 expect ( credentials , 'credentials should exist' ) . toBeDefined ( ) ;
100- const found = credentials ! . some ( ( c : Record < string , unknown > ) => c . name === identityName ) ;
101- expect ( found , `Identity "${ identityName } " should be in config` ) . toBe ( true ) ;
100+ const found = credentials ! . some ( ( c : Record < string , unknown > ) => c . name === credentialName ) ;
101+ expect ( found , `Credential "${ credentialName } " should be in config` ) . toBe ( true ) ;
102102 } ) ;
103103
104- it ( 'removes the identity resource' , async ( ) => {
105- const result = await runCLI ( [ 'remove' , 'identity ' , '--name' , identityName , '--json' ] , project . projectPath ) ;
104+ it ( 'removes the credential resource' , async ( ) => {
105+ const result = await runCLI ( [ 'remove' , 'credential ' , '--name' , credentialName , '--json' ] , project . projectPath ) ;
106106
107107 expect ( result . exitCode , `stdout: ${ result . stdout } , stderr: ${ result . stderr } ` ) . toBe ( 0 ) ;
108108 const json = JSON . parse ( result . stdout ) ;
@@ -111,8 +111,8 @@ describe('integration: add and remove resources', () => {
111111 // Verify config updated
112112 const config = await readProjectConfig ( project . projectPath ) ;
113113 const credentials = ( config . credentials as Record < string , unknown > [ ] | undefined ) ?? [ ] ;
114- const found = credentials . some ( ( c : Record < string , unknown > ) => c . name === identityName ) ;
115- expect ( found , `Identity "${ identityName } " should be removed from config` ) . toBe ( false ) ;
114+ const found = credentials . some ( ( c : Record < string , unknown > ) => c . name === credentialName ) ;
115+ expect ( found , `Credential "${ credentialName } " should be removed from config` ) . toBe ( false ) ;
116116 } ) ;
117117 } ) ;
118118} ) ;
0 commit comments