File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
infrastructure/terraform/components/api
lambdas/api-handler/src/__tests__ Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,9 @@ data "aws_iam_policy_document" "get_letter_data_lambda" {
7272
7373 statement {
7474 sid = " S3GetObjectForPresign"
75- actions = [" s3:GetObject" ]
75+ actions = [
76+ " s3:GetObject" ,
77+ " s3:ListBucket" ] # allows 404 response instead of 403 if object missing
7678 resources = [" ${ module . s3bucket_test_letters . arn } /*" ]
7779 }
7880}
Original file line number Diff line number Diff line change 1+ import * as handlers from "../index" ;
2+ jest . mock ( '../config/lambda-config' , ( ) => ( {
3+ lambdaConfig : {
4+ SUPPLIER_ID_HEADER : 'nhsd-supplier-id' ,
5+ APIM_CORRELATION_HEADER : 'nhsd-correlation-id'
6+ }
7+ } ) ) ;
8+
9+ it ( "exports" , ( ) => {
10+ expect ( handlers . getLetters ) . toBeDefined ( ) ;
11+ expect ( handlers . patchLetter ) . toBeDefined ( ) ;
12+ expect ( handlers . getLetterData ) . toBeDefined ( ) ;
13+ } ) ;
You can’t perform that action at this time.
0 commit comments