From a89b4f34af35fd3d65f8b75bf59bdb255fbe9ff0 Mon Sep 17 00:00:00 2001 From: Michael Sambol Date: Wed, 30 Oct 2024 16:02:27 -0700 Subject: [PATCH] Add docs on integration test --- .../aws-pipes-targets-alpha/lib/api-destination.ts | 2 +- .../@aws-cdk/aws-pipes-targets-alpha/lib/api-gateway.ts | 2 +- .../aws-pipes-targets-alpha/test/integ.api-gateway.ts | 9 ++++++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/@aws-cdk/aws-pipes-targets-alpha/lib/api-destination.ts b/packages/@aws-cdk/aws-pipes-targets-alpha/lib/api-destination.ts index cfa0cad020bf3..01419c7904643 100644 --- a/packages/@aws-cdk/aws-pipes-targets-alpha/lib/api-destination.ts +++ b/packages/@aws-cdk/aws-pipes-targets-alpha/lib/api-destination.ts @@ -43,7 +43,7 @@ export interface ApiDestinationTargetParameters { } /** - * A EventBridge Pipes target that sends messages to an EventBridge API destination. + * An EventBridge Pipes target that sends messages to an EventBridge API destination. */ export class ApiDestinationTarget implements ITarget { private destination: IApiDestination; diff --git a/packages/@aws-cdk/aws-pipes-targets-alpha/lib/api-gateway.ts b/packages/@aws-cdk/aws-pipes-targets-alpha/lib/api-gateway.ts index a2e9d9935c1f2..cac2fc70585c1 100644 --- a/packages/@aws-cdk/aws-pipes-targets-alpha/lib/api-gateway.ts +++ b/packages/@aws-cdk/aws-pipes-targets-alpha/lib/api-gateway.ts @@ -61,7 +61,7 @@ export interface ApiGatewayTargetParameters { } /** - * A EventBridge Pipes target that sends messages to an EventBridge API destination. + * An EventBridge Pipes target that sends messages to an EventBridge API destination. */ export class ApiGatewayTarget implements ITarget { private restApi: IRestApi; diff --git a/packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.api-gateway.ts b/packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.api-gateway.ts index fc267bed4e6cb..dc27af3a912b6 100644 --- a/packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.api-gateway.ts +++ b/packages/@aws-cdk/aws-pipes-targets-alpha/test/integ.api-gateway.ts @@ -10,7 +10,14 @@ const app = new cdk.App(); const stack = new cdk.Stack(app, 'aws-cdk-pipes-targets-api-gw'); const sourceQueue = new cdk.aws_sqs.Queue(stack, 'SourceQueue'); -// SQS (pipe source) --> API Gateway REST API (pipe target) --> Lambda function +/* + * This integration test sends a message to an SQS queue which invokes + * the REST API. There is a Lambda function on the backend of the REST API. + * We check that the Lambda function was invoked, proving that the message + * made it through the pipe. + * + * SQS (pipe source) --> API Gateway REST API (pipe target) --> Lambda function + */ const fn = new lambda.Function(stack, 'ConnectHandler', { runtime: lambda.Runtime.NODEJS_LATEST,