@@ -4,8 +4,8 @@ import { mkdir, readFile, writeFile } from 'node:fs/promises';
44import { join } from 'node:path' ;
55import { afterAll , beforeAll , describe , expect , it } from 'vitest' ;
66
7- async function readMcpConfig ( projectPath : string ) {
8- return JSON . parse ( await readFile ( join ( projectPath , 'agentcore/mcp .json' ) , 'utf-8' ) ) ;
7+ async function readProjectConfig ( projectPath : string ) {
8+ return JSON . parse ( await readFile ( join ( projectPath , 'agentcore/agentcore .json' ) , 'utf-8' ) ) ;
99}
1010
1111describe ( 'integration: add and remove gateway with external MCP server' , ( ) => {
@@ -29,9 +29,9 @@ describe('integration: add and remove gateway with external MCP server', () => {
2929 const json = JSON . parse ( result . stdout ) ;
3030 expect ( json . success ) . toBe ( true ) ;
3131
32- const mcpSpec = await readMcpConfig ( project . projectPath ) ;
32+ const mcpSpec = await readProjectConfig ( project . projectPath ) ;
3333 const gateway = mcpSpec . agentCoreGateways ?. find ( ( g : { name : string } ) => g . name === gatewayName ) ;
34- expect ( gateway , `Gateway "${ gatewayName } " should be in mcp .json` ) . toBeTruthy ( ) ;
34+ expect ( gateway , `Gateway "${ gatewayName } " should be in agentcore .json` ) . toBeTruthy ( ) ;
3535 expect ( gateway . authorizerType ) . toBe ( 'NONE' ) ;
3636 } ) ;
3737
@@ -57,7 +57,7 @@ describe('integration: add and remove gateway with external MCP server', () => {
5757 const json = JSON . parse ( result . stdout ) ;
5858 expect ( json . success ) . toBe ( true ) ;
5959
60- const mcpSpec = await readMcpConfig ( project . projectPath ) ;
60+ const mcpSpec = await readProjectConfig ( project . projectPath ) ;
6161 const gateway = mcpSpec . agentCoreGateways ?. find ( ( g : { name : string } ) => g . name === gatewayName ) ;
6262 const target = gateway ?. targets ?. find ( ( t : { name : string } ) => t . name === targetName ) ;
6363 expect ( target , `Target "${ targetName } " should be in gateway targets` ) . toBeTruthy ( ) ;
@@ -70,7 +70,7 @@ describe('integration: add and remove gateway with external MCP server', () => {
7070 const json = JSON . parse ( result . stdout ) ;
7171 expect ( json . success ) . toBe ( true ) ;
7272
73- const mcpSpec = await readMcpConfig ( project . projectPath ) ;
73+ const mcpSpec = await readProjectConfig ( project . projectPath ) ;
7474 const gateway = mcpSpec . agentCoreGateways ?. find ( ( g : { name : string } ) => g . name === gatewayName ) ;
7575 const targets = gateway ?. targets ?? [ ] ;
7676 const found = targets . find ( ( t : { name : string } ) => t . name === targetName ) ;
@@ -84,7 +84,7 @@ describe('integration: add and remove gateway with external MCP server', () => {
8484 const json = JSON . parse ( result . stdout ) ;
8585 expect ( json . success ) . toBe ( true ) ;
8686
87- const mcpSpec = await readMcpConfig ( project . projectPath ) ;
87+ const mcpSpec = await readProjectConfig ( project . projectPath ) ;
8888 const gateways = mcpSpec . agentCoreGateways ?? [ ] ;
8989 const found = gateways . find ( ( g : { name : string } ) => g . name === gatewayName ) ;
9090 expect ( found , `Gateway "${ gatewayName } " should be removed` ) . toBeFalsy ( ) ;
@@ -161,7 +161,7 @@ describe('integration: add and remove gateway with OpenAPI schema target', () =>
161161 expect ( json . success ) . toBe ( true ) ;
162162 expect ( json . toolName ) . toBe ( targetName ) ;
163163
164- const mcpSpec = await readMcpConfig ( project . projectPath ) ;
164+ const mcpSpec = await readProjectConfig ( project . projectPath ) ;
165165 const gateway = mcpSpec . agentCoreGateways ?. find ( ( g : { name : string } ) => g . name === gatewayName ) ;
166166 const target = gateway ?. targets ?. find ( ( t : { name : string } ) => t . name === targetName ) ;
167167 expect ( target , `Target "${ targetName } " should be in gateway targets` ) . toBeTruthy ( ) ;
@@ -202,7 +202,7 @@ describe('integration: add and remove gateway with OpenAPI schema target', () =>
202202 const json = JSON . parse ( result . stdout ) ;
203203 expect ( json . success ) . toBe ( true ) ;
204204
205- const mcpSpec = await readMcpConfig ( project . projectPath ) ;
205+ const mcpSpec = await readProjectConfig ( project . projectPath ) ;
206206 const gateway = mcpSpec . agentCoreGateways ?. find ( ( g : { name : string } ) => g . name === gatewayName ) ;
207207 const targets = gateway ?. targets ?? [ ] ;
208208 const found = targets . find ( ( t : { name : string } ) => t . name === targetName ) ;
@@ -271,7 +271,7 @@ describe('integration: add gateway with S3 URI schema target', () => {
271271 expect ( json . success ) . toBe ( true ) ;
272272 expect ( json . toolName ) . toBe ( targetName ) ;
273273
274- const mcpSpec = await readMcpConfig ( project . projectPath ) ;
274+ const mcpSpec = await readProjectConfig ( project . projectPath ) ;
275275 const gateway = mcpSpec . agentCoreGateways ?. find ( ( g : { name : string } ) => g . name === gatewayName ) ;
276276 const target = gateway ?. targets ?. find ( ( t : { name : string } ) => t . name === targetName ) ;
277277 expect ( target , `Target "${ targetName } " should be in gateway targets` ) . toBeTruthy ( ) ;
@@ -333,7 +333,7 @@ describe('integration: add gateway with S3 URI and bucketOwnerAccountId', () =>
333333 const json = JSON . parse ( result . stdout ) ;
334334 expect ( json . success ) . toBe ( true ) ;
335335
336- const mcpSpec = await readMcpConfig ( project . projectPath ) ;
336+ const mcpSpec = await readProjectConfig ( project . projectPath ) ;
337337 const gateway = mcpSpec . agentCoreGateways ?. find ( ( g : { name : string } ) => g . name === gatewayName ) ;
338338 const target = gateway ?. targets ?. find ( ( t : { name : string } ) => t . name === targetName ) ;
339339 expect ( target . schemaSource ?. s3 ?. uri ) . toBe ( 's3://cross-account-bucket/spec.json' ) ;
@@ -395,7 +395,7 @@ describe('integration: add gateway with Smithy model target', () => {
395395 expect ( json . success ) . toBe ( true ) ;
396396 expect ( json . toolName ) . toBe ( targetName ) ;
397397
398- const mcpSpec = await readMcpConfig ( project . projectPath ) ;
398+ const mcpSpec = await readProjectConfig ( project . projectPath ) ;
399399 const gateway = mcpSpec . agentCoreGateways ?. find ( ( g : { name : string } ) => g . name === gatewayName ) ;
400400 const target = gateway ?. targets ?. find ( ( t : { name : string } ) => t . name === targetName ) ;
401401 expect ( target , `Target "${ targetName } " should be in gateway targets` ) . toBeTruthy ( ) ;
@@ -410,7 +410,7 @@ describe('integration: add gateway with Smithy model target', () => {
410410 const json = JSON . parse ( result . stdout ) ;
411411 expect ( json . success ) . toBe ( true ) ;
412412
413- const mcpSpec = await readMcpConfig ( project . projectPath ) ;
413+ const mcpSpec = await readProjectConfig ( project . projectPath ) ;
414414 const gateway = mcpSpec . agentCoreGateways ?. find ( ( g : { name : string } ) => g . name === gatewayName ) ;
415415 const targets = gateway ?. targets ?? [ ] ;
416416 const found = targets . find ( ( t : { name : string } ) => t . name === targetName ) ;
0 commit comments