Skip to content

Commit ce64d99

Browse files
committed
fix agentcore integ test
1 parent a63c20f commit ce64d99

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

packages/@aws-cdk/aws-bedrock-agentcore-alpha/test/agentcore/gateway/integ.gateway.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import * as cdk from 'aws-cdk-lib';
99
import * as lambda from 'aws-cdk-lib/aws-lambda';
1010
import * as integ from '@aws-cdk/integ-tests-alpha';
1111
import * as agentcore from '../../../agentcore';
12+
import * as path from 'path';
1213

1314
const app = new cdk.App();
1415
const stack = new cdk.Stack(app, 'BedrockAgentCoreGatewayIntegTest', {
@@ -80,7 +81,7 @@ const lambdaTarget = gateway.addLambdaTarget('LambdaTarget', {
8081
const smithyTarget = gateway.addSmithyTarget('SmithyTarget', {
8182
gatewayTargetName: 'smithy-test-target',
8283
description: 'Smithy target using convenience method',
83-
smithyModel: agentcore.ApiSchema.fromLocalAsset('schemas/smithy/basic-service.json'),
84+
smithyModel: agentcore.ApiSchema.fromLocalAsset(path.join(__dirname, 'schemas/smithy/basic-service.json')),
8485
});
8586

8687
// ===== Outputs =====

packages/@aws-cdk/aws-bedrock-agentcore-alpha/test/agentcore/gateway/integ.target.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import * as cdk from 'aws-cdk-lib';
99
import * as lambda from 'aws-cdk-lib/aws-lambda';
1010
import * as integ from '@aws-cdk/integ-tests-alpha';
1111
import * as agentcore from '../../../agentcore';
12+
import * as path from 'path';
1213

1314
const app = new cdk.App();
1415
const stack = new cdk.Stack(app, 'BedrockAgentCoreTargetIntegTest', {
@@ -69,7 +70,7 @@ const smithyTarget = agentcore.GatewayTarget.forSmithy(stack, 'SmithyTarget', {
6970
gateway: gateway,
7071
gatewayTargetName: 'smithy-via-static',
7172
description: 'Target created via forSmithy static method',
72-
smithyModel: agentcore.ApiSchema.fromLocalAsset('schemas/smithy/basic-service.json'),
73+
smithyModel: agentcore.ApiSchema.fromLocalAsset(path.join(__dirname, 'schemas/smithy/basic-service.json')),
7374
});
7475

7576
// ===== Test 4: GatewayTarget Constructor with LambdaTargetConfiguration =====

0 commit comments

Comments
 (0)