Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 0e75d9e

Browse files
author
Esen Sagynov
committedMar 22, 2024·
Fixed unit tests and snapshots.
1 parent be9ec10 commit 0e75d9e

File tree

27 files changed

+210
-81
lines changed

27 files changed

+210
-81
lines changed
 

‎packages/cdk-blue-green-container-deployment/src/__tests__/__snapshots__/dummy-task-definition.test.ts.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Object {
1616
"Arn",
1717
],
1818
},
19-
"Runtime": "nodejs16.x",
19+
"Runtime": "nodejs18.x",
2020
"Timeout": 120,
2121
},
2222
"Type": "AWS::Lambda::Function",

‎packages/cdk-blue-green-container-deployment/src/__tests__/ecs-deployment-group.test.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ describe('EcsDeploymentConfig', () => {
9494
const { service, prodTargetGroup, testTargetGroup, prodListener, testListener } = createPrereqResources(stack);
9595

9696
const customApplication = new codedeploy.EcsApplication(stack, 'CustomApplication', {
97-
applicationName: 'My Custom Application',
97+
applicationName: 'My-Custom-Application',
9898
});
9999

100100
new EcsDeploymentGroup(stack, 'DeploymentGroup', {
@@ -110,7 +110,7 @@ describe('EcsDeploymentConfig', () => {
110110
expectCDK(stack).to(
111111
haveResource('AWS::CodeDeploy::Application', {
112112
ComputePlatform: 'ECS',
113-
ApplicationName: 'My Custom Application',
113+
ApplicationName: 'My-Custom-Application',
114114
}),
115115
);
116116

@@ -129,7 +129,7 @@ describe('EcsDeploymentConfig', () => {
129129
const { service, prodTargetGroup, testTargetGroup, prodListener, testListener } = createPrereqResources(stack);
130130

131131
new EcsDeploymentGroup(stack, 'DeploymentGroup', {
132-
applicationName: 'My Named Application',
132+
applicationName: 'My-Named-Application',
133133
deploymentGroupName: 'My Deployment Group',
134134
ecsServices: [service],
135135
targetGroups: [prodTargetGroup, testTargetGroup],
@@ -141,7 +141,7 @@ describe('EcsDeploymentConfig', () => {
141141
expectCDK(stack).to(
142142
haveResource('AWS::CodeDeploy::Application', {
143143
ComputePlatform: 'ECS',
144-
ApplicationName: 'My Named Application',
144+
ApplicationName: 'My-Named-Application',
145145
}),
146146
);
147147

‎packages/cdk-cloudfront-authorization/src/__tests__/__snapshots__/authorizations.test.ts.snap

+8-8
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Object {
1616
"Arn",
1717
],
1818
},
19-
"Runtime": "nodejs16.x",
19+
"Runtime": "nodejs18.x",
2020
"Timeout": 120,
2121
},
2222
"Type": "AWS::Lambda::Function",
@@ -66,7 +66,7 @@ Object {
6666
"Arn",
6767
],
6868
},
69-
"Runtime": "nodejs16.x"",
69+
"Runtime": "nodejs16.x",
7070
"Timeout": 300,
7171
},
7272
"Type": "AWS::Lambda::Function",
@@ -183,7 +183,7 @@ Object {
183183
"Arn",
184184
],
185185
},
186-
"Runtime": "nodejs16.x"",
186+
"Runtime": "nodejs16.x",
187187
},
188188
"Type": "AWS::Lambda::Function",
189189
},
@@ -232,7 +232,7 @@ Object {
232232
"Arn",
233233
],
234234
},
235-
"Runtime": "nodejs16.x"",
235+
"Runtime": "nodejs16.x",
236236
},
237237
"Type": "AWS::Lambda::Function",
238238
},
@@ -993,7 +993,7 @@ Object {
993993
"Arn",
994994
],
995995
},
996-
"Runtime": "nodejs16.x",
996+
"Runtime": "nodejs18.x",
997997
"Timeout": 120,
998998
},
999999
"Type": "AWS::Lambda::Function",
@@ -1043,7 +1043,7 @@ Object {
10431043
"Arn",
10441044
],
10451045
},
1046-
"Runtime": "nodejs16.x"",
1046+
"Runtime": "nodejs16.x",
10471047
"Timeout": 300,
10481048
},
10491049
"Type": "AWS::Lambda::Function",
@@ -1160,7 +1160,7 @@ Object {
11601160
"Arn",
11611161
],
11621162
},
1163-
"Runtime": "nodejs16.x"",
1163+
"Runtime": "nodejs16.x",
11641164
},
11651165
"Type": "AWS::Lambda::Function",
11661166
},
@@ -1209,7 +1209,7 @@ Object {
12091209
"Arn",
12101210
],
12111211
},
1212-
"Runtime": "nodejs16.x"",
1212+
"Runtime": "nodejs16.x",
12131213
},
12141214
"Type": "AWS::Lambda::Function",
12151215
},

‎packages/cdk-cloudfront-authorization/src/__tests__/__snapshots__/distributions.test.ts.snap

+14-12
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Object {
1616
"Arn",
1717
],
1818
},
19-
"Runtime": "nodejs16.x",
19+
"Runtime": "nodejs18.x",
2020
"Timeout": 120,
2121
},
2222
"Type": "AWS::Lambda::Function",
@@ -70,15 +70,15 @@ Object {
7070
],
7171
],
7272
},
73-
"Handler": "__entrypoint__.handler",
73+
"Handler": "index.handler",
7474
"MemorySize": 128,
7575
"Role": Object {
7676
"Fn::GetAtt": Array [
7777
"CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092",
7878
"Arn",
7979
],
8080
},
81-
"Runtime": "nodejs16.x",
81+
"Runtime": "nodejs18.x",
8282
"Timeout": 900,
8383
},
8484
"Type": "AWS::Lambda::Function",
@@ -119,7 +119,7 @@ Object {
119119
"Arn",
120120
],
121121
},
122-
"Runtime": "nodejs16.x"",
122+
"Runtime": "nodejs16.x",
123123
"Timeout": 300,
124124
},
125125
"Type": "AWS::Lambda::Function",
@@ -236,7 +236,7 @@ Object {
236236
"Arn",
237237
],
238238
},
239-
"Runtime": "nodejs16.x"",
239+
"Runtime": "nodejs16.x",
240240
},
241241
"Type": "AWS::Lambda::Function",
242242
},
@@ -285,7 +285,7 @@ Object {
285285
"Arn",
286286
],
287287
},
288-
"Runtime": "nodejs16.x"",
288+
"Runtime": "nodejs16.x",
289289
},
290290
"Type": "AWS::Lambda::Function",
291291
},
@@ -1238,6 +1238,7 @@ Object {
12381238
"Statement": Array [
12391239
Object {
12401240
"Action": Array [
1241+
"s3:PutBucketPolicy",
12411242
"s3:GetBucket*",
12421243
"s3:List*",
12431244
"s3:DeleteObject*",
@@ -1402,7 +1403,7 @@ Object {
14021403
"Arn",
14031404
],
14041405
},
1405-
"Runtime": "nodejs16.x",
1406+
"Runtime": "nodejs18.x",
14061407
"Timeout": 120,
14071408
},
14081409
"Type": "AWS::Lambda::Function",
@@ -1456,15 +1457,15 @@ Object {
14561457
],
14571458
],
14581459
},
1459-
"Handler": "__entrypoint__.handler",
1460+
"Handler": "index.handler",
14601461
"MemorySize": 128,
14611462
"Role": Object {
14621463
"Fn::GetAtt": Array [
14631464
"CustomS3AutoDeleteObjectsCustomResourceProviderRole3B1BD092",
14641465
"Arn",
14651466
],
14661467
},
1467-
"Runtime": "nodejs16.x",
1468+
"Runtime": "nodejs18.x",
14681469
"Timeout": 900,
14691470
},
14701471
"Type": "AWS::Lambda::Function",
@@ -1505,7 +1506,7 @@ Object {
15051506
"Arn",
15061507
],
15071508
},
1508-
"Runtime": "nodejs16.x"",
1509+
"Runtime": "nodejs16.x",
15091510
"Timeout": 300,
15101511
},
15111512
"Type": "AWS::Lambda::Function",
@@ -1622,7 +1623,7 @@ Object {
16221623
"Arn",
16231624
],
16241625
},
1625-
"Runtime": "nodejs16.x"",
1626+
"Runtime": "nodejs16.x",
16261627
},
16271628
"Type": "AWS::Lambda::Function",
16281629
},
@@ -1671,7 +1672,7 @@ Object {
16711672
"Arn",
16721673
],
16731674
},
1674-
"Runtime": "nodejs16.x"",
1675+
"Runtime": "nodejs16.x",
16751676
},
16761677
"Type": "AWS::Lambda::Function",
16771678
},
@@ -2739,6 +2740,7 @@ Object {
27392740
"Statement": Array [
27402741
Object {
27412742
"Action": Array [
2743+
"s3:PutBucketPolicy",
27422744
"s3:GetBucket*",
27432745
"s3:List*",
27442746
"s3:DeleteObject*",

‎packages/cdk-codecommit-backup/src/__tests__/__snapshots__/full-region-s3-codecommit-backup.test.ts.snap

+12
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,10 @@ Object {
307307
Object {
308308
"Action": Array [
309309
"s3:PutObject",
310+
"s3:PutObjectLegalHold",
311+
"s3:PutObjectRetention",
312+
"s3:PutObjectTagging",
313+
"s3:PutObjectVersionTagging",
310314
"s3:Abort*",
311315
],
312316
"Effect": "Allow",
@@ -683,6 +687,10 @@ Object {
683687
Object {
684688
"Action": Array [
685689
"s3:PutObject",
690+
"s3:PutObjectLegalHold",
691+
"s3:PutObjectRetention",
692+
"s3:PutObjectTagging",
693+
"s3:PutObjectVersionTagging",
686694
"s3:Abort*",
687695
],
688696
"Effect": "Allow",
@@ -1184,6 +1192,10 @@ Object {
11841192
Object {
11851193
"Action": Array [
11861194
"s3:PutObject",
1195+
"s3:PutObjectLegalHold",
1196+
"s3:PutObjectRetention",
1197+
"s3:PutObjectTagging",
1198+
"s3:PutObjectVersionTagging",
11871199
"s3:Abort*",
11881200
],
11891201
"Effect": "Allow",

‎packages/cdk-codecommit-backup/src/__tests__/__snapshots__/s3-codecommit-backup.test.ts.snap

+8
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,10 @@ Object {
265265
Object {
266266
"Action": Array [
267267
"s3:PutObject",
268+
"s3:PutObjectLegalHold",
269+
"s3:PutObjectRetention",
270+
"s3:PutObjectTagging",
271+
"s3:PutObjectVersionTagging",
268272
"s3:Abort*",
269273
],
270274
"Effect": "Allow",
@@ -618,6 +622,10 @@ Object {
618622
Object {
619623
"Action": Array [
620624
"s3:PutObject",
625+
"s3:PutObjectLegalHold",
626+
"s3:PutObjectRetention",
627+
"s3:PutObjectTagging",
628+
"s3:PutObjectVersionTagging",
621629
"s3:Abort*",
622630
],
623631
"Effect": "Allow",

‎packages/cdk-codepipeline-anchore-inline-scan-action/src/__tests__/__snapshots__/codepipeline-anchore-inline-scan-action.test.ts.snap

+8
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,10 @@ Object {
593593
"s3:List*",
594594
"s3:DeleteObject*",
595595
"s3:PutObject",
596+
"s3:PutObjectLegalHold",
597+
"s3:PutObjectRetention",
598+
"s3:PutObjectTagging",
599+
"s3:PutObjectVersionTagging",
596600
"s3:Abort*",
597601
],
598602
"Effect": "Allow",
@@ -710,6 +714,10 @@ Object {
710714
"s3:List*",
711715
"s3:DeleteObject*",
712716
"s3:PutObject",
717+
"s3:PutObjectLegalHold",
718+
"s3:PutObjectRetention",
719+
"s3:PutObjectTagging",
720+
"s3:PutObjectVersionTagging",
713721
"s3:Abort*",
714722
],
715723
"Effect": "Allow",

‎packages/cdk-codepipeline-check-parameter-action/src/__tests__/__snapshots__/codepipeline-check-email-parameter-action.test.ts.snap

+8
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,10 @@ Object {
470470
"s3:List*",
471471
"s3:DeleteObject*",
472472
"s3:PutObject",
473+
"s3:PutObjectLegalHold",
474+
"s3:PutObjectRetention",
475+
"s3:PutObjectTagging",
476+
"s3:PutObjectVersionTagging",
473477
"s3:Abort*",
474478
],
475479
"Effect": "Allow",
@@ -587,6 +591,10 @@ Object {
587591
"s3:List*",
588592
"s3:DeleteObject*",
589593
"s3:PutObject",
594+
"s3:PutObjectLegalHold",
595+
"s3:PutObjectRetention",
596+
"s3:PutObjectTagging",
597+
"s3:PutObjectVersionTagging",
590598
"s3:Abort*",
591599
],
592600
"Effect": "Allow",

0 commit comments

Comments
 (0)
Please sign in to comment.