From 04e35f71c4e38e49351b3dc5d0a548535c27d080 Mon Sep 17 00:00:00 2001 From: Jon Wallsten Date: Sat, 5 Oct 2024 17:19:37 +0200 Subject: [PATCH] Fixed linting issue and missing jddoc comment Updated integration tests --- .../test/http/integ.lambda.ts | 8 +++++++- .../test/http/integ.user-pool.ts | 11 +++++++++-- .../test/http/jwt.test.ts | 1 - .../test/http/lambda.test.ts | 1 - .../test/http/user-pool.test.ts | 1 - 5 files changed, 16 insertions(+), 6 deletions(-) diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-apigatewayv2-authorizers/test/http/integ.lambda.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-apigatewayv2-authorizers/test/http/integ.lambda.ts index ec54d8ecfc28e..697f27cf44335 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-apigatewayv2-authorizers/test/http/integ.lambda.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-apigatewayv2-authorizers/test/http/integ.lambda.ts @@ -62,4 +62,10 @@ new CfnOutput(stack, 'URL', { }); new CfnOutput(stack, 'URLWithDefaultAuthorizer', { value: httpApiWithDefaultAuthorizer.url!, -}); \ No newline at end of file +}); +new CfnOutput(stack, 'AuthorizerId', { + value: authorizer.authorizerId, +}); +new CfnOutput(stack, 'AuthorizationType', { + value: authorizer.authorizationType, +}); diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-apigatewayv2-authorizers/test/http/integ.user-pool.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-apigatewayv2-authorizers/test/http/integ.user-pool.ts index 8e193d3215326..2d50932e54d7e 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-apigatewayv2-authorizers/test/http/integ.user-pool.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-apigatewayv2-authorizers/test/http/integ.user-pool.ts @@ -3,7 +3,7 @@ import { HttpApi, HttpMethod, HttpRoute, HttpRouteKey } from 'aws-cdk-lib/aws-ap import { HttpLambdaIntegration } from 'aws-cdk-lib/aws-apigatewayv2-integrations'; import * as cognito from 'aws-cdk-lib/aws-cognito'; import * as lambda from 'aws-cdk-lib/aws-lambda'; -import { App, Stack } from 'aws-cdk-lib'; +import { App, Stack, CfnOutput } from 'aws-cdk-lib'; import { HttpUserPoolAuthorizer } from 'aws-cdk-lib/aws-apigatewayv2-authorizers'; /* @@ -45,4 +45,11 @@ new HttpRoute(stack, 'Route', { httpApi: httpApiWithDefaultAuthorizer, routeKey: HttpRouteKey.with('/v1/mything/{proxy+}', HttpMethod.ANY), integration: new HttpLambdaIntegration('RootIntegration', handler), -}); \ No newline at end of file +}); + +new CfnOutput(stack, 'AuthorizerId', { + value: authorizer.authorizerId, +}); +new CfnOutput(stack, 'AuthorizationType', { + value: authorizer.authorizationType, +}); diff --git a/packages/aws-cdk-lib/aws-apigatewayv2-authorizers/test/http/jwt.test.ts b/packages/aws-cdk-lib/aws-apigatewayv2-authorizers/test/http/jwt.test.ts index 78a3a56c95d0e..1b12c69ae6b1e 100644 --- a/packages/aws-cdk-lib/aws-apigatewayv2-authorizers/test/http/jwt.test.ts +++ b/packages/aws-cdk-lib/aws-apigatewayv2-authorizers/test/http/jwt.test.ts @@ -75,7 +75,6 @@ describe('HttpJwtAuthorizer', () => { // THEN expect(authorizer.authorizerId).toBeDefined(); - expect(authorizer.authorizerId).toEqual(authorizer['authorizer']?.authorizerId); }); test('should throw error when acessing authorizer before it been bound to route', () => { diff --git a/packages/aws-cdk-lib/aws-apigatewayv2-authorizers/test/http/lambda.test.ts b/packages/aws-cdk-lib/aws-apigatewayv2-authorizers/test/http/lambda.test.ts index 43eba81e63fc3..3d48426c81834 100644 --- a/packages/aws-cdk-lib/aws-apigatewayv2-authorizers/test/http/lambda.test.ts +++ b/packages/aws-cdk-lib/aws-apigatewayv2-authorizers/test/http/lambda.test.ts @@ -181,7 +181,6 @@ describe('HttpLambdaAuthorizer', () => { // THEN expect(authorizer.authorizerId).toBeDefined(); - expect(authorizer.authorizerId).toEqual(authorizer['authorizer']?.authorizerId); }); test('should throw error when acessing authorizer before it been bound to route', () => { diff --git a/packages/aws-cdk-lib/aws-apigatewayv2-authorizers/test/http/user-pool.test.ts b/packages/aws-cdk-lib/aws-apigatewayv2-authorizers/test/http/user-pool.test.ts index d24cb8e98e0be..d5155d969bbf6 100644 --- a/packages/aws-cdk-lib/aws-apigatewayv2-authorizers/test/http/user-pool.test.ts +++ b/packages/aws-cdk-lib/aws-apigatewayv2-authorizers/test/http/user-pool.test.ts @@ -124,7 +124,6 @@ describe('HttpUserPoolAuthorizer', () => { // THEN expect(authorizer.authorizerId).toBeDefined(); - expect(authorizer.authorizerId).toEqual(authorizer['authorizer']?.authorizerId); }); test('should throw error when acessing authorizer before it been bound to route', () => {