Skip to content

Commit

Permalink
Fixed linting issue and missing jddoc comment
Browse files Browse the repository at this point in the history
Updated integration tests
  • Loading branch information
JonWallsten committed Oct 5, 2024
1 parent c8dcace commit e430118
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,10 @@ new CfnOutput(stack, 'URL', {
});
new CfnOutput(stack, 'URLWithDefaultAuthorizer', {
value: httpApiWithDefaultAuthorizer.url!,
});
});
new CfnOutput(stack, 'AuthorizerId', {
value: authorizer.authorizerId
});
new CfnOutput(stack, 'AuthorizationType', {
value: authorizer.authorizationType
});
Original file line number Diff line number Diff line change
Expand Up @@ -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';

/*
Expand Down Expand Up @@ -45,4 +45,11 @@ new HttpRoute(stack, 'Route', {
httpApi: httpApiWithDefaultAuthorizer,
routeKey: HttpRouteKey.with('/v1/mything/{proxy+}', HttpMethod.ANY),
integration: new HttpLambdaIntegration('RootIntegration', handler),
});
});

new CfnOutput(stack, 'AuthorizerId', {
value: authorizer.authorizerId
});
new CfnOutput(stack, 'AuthorizationType', {
value: authorizer.authorizationType
});
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down

0 comments on commit e430118

Please sign in to comment.