Fix: [AEA-0000] - create typescript function cdk construct #561
pull_request.yml
on: pull_request
quality_checks
/
quality_checks
1m 4s
pr_title_format_check
/
pr_title_format_check
3s
release_code
/
upload_docker_image
Annotations
3 errors and 1 warning
|
quality_checks / quality_checks
Process completed with exit code 2.
|
|
tests/functionConstruct.test.ts > functionConstruct works correctly with additional policies > it has the correct policies in the role:
packages/cdkConstructs/tests/functionConstruct.test.ts#L213
AssertionError: Template has 1 resources with type AWS::IAM::Role, but none match as expected.
The 1 closest matches:
dummyFunctionLambdaRole63DA9F92 :: {
"Properties": {
"AssumeRolePolicyDocument": { ... },
"ManagedPolicyArns": [
{ "Ref": "dummyFunctionLambdaPutLogsManagedPolicy46E54AE3" },
!! arrayWith pattern 0 matched here
{
"Fn::ImportValue": "lambda-resources:LambdaInsightsLogGroupPolicy"
},
!! arrayWith pattern 1 matched here
{
"Fn::ImportValue": "account-resources:CloudwatchEncryptionKMSPolicyArn"
},
!! Could not match arrayWith pattern 2. This is the closest match
{
!! Missing key 'Fn::ImportValue'
"Fn::ImportValue": undefined,
!! Unexpected key Ref
"Ref": "testPolicyBC567125"
}
]
},
"Type": "AWS::IAM::Role"
}
❯ Template.hasResourceProperties ../../node_modules/aws-cdk-lib/assertions/lib/template.js:1:3201
❯ tests/functionConstruct.test.ts:213:14
|
|
tests/functionConstruct.test.ts > functionConstruct works correctly > it has the correct role:
packages/cdkConstructs/tests/functionConstruct.test.ts#L94
AssertionError: Template has 1 resources with type AWS::IAM::Role, but none match as expected.
The 1 closest matches:
dummyFunctionLambdaRole63DA9F92 :: {
"Properties": {
"AssumeRolePolicyDocument": { ... },
"ManagedPolicyArns": [
{ "Ref": "dummyFunctionLambdaPutLogsManagedPolicy46E54AE3" },
!! arrayWith pattern 0 matched here
{
"Fn::ImportValue": "lambda-resources:LambdaInsightsLogGroupPolicy"
},
!! arrayWith pattern 1 matched here
{
"Fn::ImportValue": "account-resources:CloudwatchEncryptionKMSPolicyArn"
}
!! Could not match arrayWith pattern 2. No more elements to try
]
},
"Type": "AWS::IAM::Role"
}
❯ Template.hasResourceProperties ../../node_modules/aws-cdk-lib/assertions/lib/template.js:1:3201
❯ tests/functionConstruct.test.ts:94:14
|
|
quality_checks / quality_checks
No files were found with the provided path: cfn_guard_output. No artifacts will be uploaded.
|