Skip to content

Commit c72d495

Browse files
authored
chore: integration test failed because of a new feature flag set to true (#1148)
This PR aws/aws-cdk#33291 adding a new feature flag to update IAM policies. If the default value is false, it shouldn't have any changes. However, in the integration tests run by CodeBuild, it's enabled for some reasons, leading to a failed integration test.
1 parent d045226 commit c72d495

File tree

2 files changed

+163
-172
lines changed

2 files changed

+163
-172
lines changed

test/integ.awscli-asset.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,18 @@ import * as cdk from 'aws-cdk-lib';
44
import * as lambda from 'aws-cdk-lib/aws-lambda';
55
import * as s3_assets from 'aws-cdk-lib/aws-s3-assets';
66
import * as cr from 'aws-cdk-lib/custom-resources';
7+
import { LAMBDA_CREATE_NEW_POLICIES_WITH_ADDTOROLEPOLICY } from 'aws-cdk-lib/cx-api';
78

89
import { ASSET_FILE, LAYER_SOURCE_DIR } from '../lib';
910

1011
/**
1112
* Test verifies that AWS CLI is invoked successfully inside Lambda runtime.
1213
*/
13-
const app = new cdk.App();
14+
const app = new cdk.App({
15+
postCliContext: {
16+
[LAMBDA_CREATE_NEW_POLICIES_WITH_ADDTOROLEPOLICY]: false,
17+
},
18+
});
1419

1520
const stack = new cdk.Stack(app, 'lambda-layer-awscli-integ-stack');
1621
const asset = new s3_assets.Asset(stack, 'layer-asset', {

0 commit comments

Comments
 (0)