diff --git a/packages/@aws-cdk/aws-appsync/test/log-retention.integ.snapshot/IntegDefaultTestDeployAssert4E6713E1.template.json b/packages/@aws-cdk/aws-appsync/test/log-retention.integ.snapshot/IntegDefaultTestDeployAssert4E6713E1.template.json index 300fde6728b66..88a6c196cc7ed 100644 --- a/packages/@aws-cdk/aws-appsync/test/log-retention.integ.snapshot/IntegDefaultTestDeployAssert4E6713E1.template.json +++ b/packages/@aws-cdk/aws-appsync/test/log-retention.integ.snapshot/IntegDefaultTestDeployAssert4E6713E1.template.json @@ -25,7 +25,7 @@ } }, "flattenResponse": "false", - "salt": "1660753153241" + "salt": "1661796816388" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -57,7 +57,7 @@ ] ] }, - "salt": "1660753153242" + "salt": "1661796816388" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -109,7 +109,7 @@ "Runtime": "nodejs14.x", "Code": { "S3Bucket": { - "Ref": "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdS3BucketF94385B7" + "Ref": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3BucketA2BC9E80" }, "S3Key": { "Fn::Join": [ @@ -122,7 +122,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdS3VersionKey66DB0F9E" + "Ref": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3VersionKeyB8E92EFE" } ] } @@ -135,7 +135,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdS3VersionKey66DB0F9E" + "Ref": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3VersionKeyB8E92EFE" } ] } @@ -167,17 +167,17 @@ } }, "Parameters": { - "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdS3BucketF94385B7": { + "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3BucketA2BC9E80": { "Type": "String", - "Description": "S3 bucket for asset \"0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd\"" + "Description": "S3 bucket for asset \"84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7\"" }, - "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdS3VersionKey66DB0F9E": { + "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3VersionKeyB8E92EFE": { "Type": "String", - "Description": "S3 key for asset version \"0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd\"" + "Description": "S3 key for asset version \"84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7\"" }, - "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdArtifactHash2AC894D9": { + "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7ArtifactHashB8137036": { "Type": "String", - "Description": "Artifact hash for asset \"0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd\"" + "Description": "Artifact hash for asset \"84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7\"" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appsync/test/log-retention.integ.snapshot/asset.0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd.bundle/index.js b/packages/@aws-cdk/aws-appsync/test/log-retention.integ.snapshot/asset.84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7.bundle/index.js old mode 100755 new mode 100644 similarity index 99% rename from packages/@aws-cdk/aws-appsync/test/log-retention.integ.snapshot/asset.0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd.bundle/index.js rename to packages/@aws-cdk/aws-appsync/test/log-retention.integ.snapshot/asset.84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7.bundle/index.js index b3ec1b8c53d30..ba956d47f51fe --- a/packages/@aws-cdk/aws-appsync/test/log-retention.integ.snapshot/asset.0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd.bundle/index.js +++ b/packages/@aws-cdk/aws-appsync/test/log-retention.integ.snapshot/asset.84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7.bundle/index.js @@ -493,7 +493,7 @@ var AssertionHandler = class extends CustomResourceHandler { } else { result = { data: JSON.stringify({ - status: "pass" + status: "success" }) }; } diff --git a/packages/@aws-cdk/aws-appsync/test/log-retention.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-appsync/test/log-retention.integ.snapshot/cdk.out index 588d7b269d34f..8ecc185e9dbee 100644 --- a/packages/@aws-cdk/aws-appsync/test/log-retention.integ.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-appsync/test/log-retention.integ.snapshot/cdk.out @@ -1 +1 @@ -{"version":"20.0.0"} \ No newline at end of file +{"version":"21.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appsync/test/log-retention.integ.snapshot/integ.json b/packages/@aws-cdk/aws-appsync/test/log-retention.integ.snapshot/integ.json index f7061163099a8..a51861bb20b53 100644 --- a/packages/@aws-cdk/aws-appsync/test/log-retention.integ.snapshot/integ.json +++ b/packages/@aws-cdk/aws-appsync/test/log-retention.integ.snapshot/integ.json @@ -1,11 +1,12 @@ { - "version": "20.0.0", + "version": "21.0.0", "testCases": { "Integ/DefaultTest": { "stacks": [ "AppSyncIntegLogRetention" ], - "assertionStack": "Integ/DefaultTest/DeployAssert" + "assertionStack": "Integ/DefaultTest/DeployAssert", + "assertionStackName": "IntegDefaultTestDeployAssert4E6713E1" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-appsync/test/log-retention.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-appsync/test/log-retention.integ.snapshot/manifest.json index 41a0338187688..19ae39c8935cd 100644 --- a/packages/@aws-cdk/aws-appsync/test/log-retention.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-appsync/test/log-retention.integ.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "artifacts": { "Tree": { "type": "cdk:tree", @@ -119,13 +119,13 @@ { "type": "aws:cdk:asset", "data": { - "path": "asset.0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd.bundle", - "id": "0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd", + "path": "asset.84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7.bundle", + "id": "84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7", "packaging": "zip", - "sourceHash": "0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd", - "s3BucketParameter": "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdS3BucketF94385B7", - "s3KeyParameter": "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdS3VersionKey66DB0F9E", - "artifactHashParameter": "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdArtifactHash2AC894D9" + "sourceHash": "84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7", + "s3BucketParameter": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3BucketA2BC9E80", + "s3KeyParameter": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3VersionKeyB8E92EFE", + "artifactHashParameter": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7ArtifactHashB8137036" } } ], @@ -159,22 +159,22 @@ "data": "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F" } ], - "/Integ/DefaultTest/DeployAssert/AssetParameters/0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd/S3Bucket": [ + "/Integ/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/S3Bucket": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdS3BucketF94385B7" + "data": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3BucketA2BC9E80" } ], - "/Integ/DefaultTest/DeployAssert/AssetParameters/0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd/S3VersionKey": [ + "/Integ/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/S3VersionKey": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdS3VersionKey66DB0F9E" + "data": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3VersionKeyB8E92EFE" } ], - "/Integ/DefaultTest/DeployAssert/AssetParameters/0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd/ArtifactHash": [ + "/Integ/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/ArtifactHash": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdArtifactHash2AC894D9" + "data": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7ArtifactHashB8137036" } ] }, diff --git a/packages/@aws-cdk/aws-appsync/test/log-retention.integ.snapshot/tree.json b/packages/@aws-cdk/aws-appsync/test/log-retention.integ.snapshot/tree.json index cd81435afe9f6..3a40b439248f4 100644 --- a/packages/@aws-cdk/aws-appsync/test/log-retention.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-appsync/test/log-retention.integ.snapshot/tree.json @@ -9,7 +9,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.71" + "version": "10.1.85" } }, "AppSyncIntegLogRetention": { @@ -136,8 +136,8 @@ "id": "LogGroup", "path": "AppSyncIntegLogRetention/GraphqlApi/LogGroup", "constructInfo": { - "fqn": "@aws-cdk/core.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "LogRetention": { @@ -148,8 +148,8 @@ "id": "Resource", "path": "AppSyncIntegLogRetention/GraphqlApi/LogRetention/Resource", "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, @@ -176,8 +176,8 @@ "id": "Stage", "path": "AppSyncIntegLogRetention/LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8a/Code/Stage", "constructInfo": { - "fqn": "@aws-cdk/core.AssetStaging", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "AssetBucket": { @@ -289,14 +289,14 @@ "id": "Resource", "path": "AppSyncIntegLogRetention/LogRetentionaae0aa3c5b4d4f87b02d85b201efdd8a/Resource", "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.71" + "version": "10.1.85" } }, "AssetParameters": { @@ -311,36 +311,36 @@ "id": "S3Bucket", "path": "AppSyncIntegLogRetention/AssetParameters/d01c24641c7d8cb6488393ffceaefff282370a9a522bf9d77b21da73fa257347/S3Bucket", "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "S3VersionKey": { "id": "S3VersionKey", "path": "AppSyncIntegLogRetention/AssetParameters/d01c24641c7d8cb6488393ffceaefff282370a9a522bf9d77b21da73fa257347/S3VersionKey", "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "ArtifactHash": { "id": "ArtifactHash", "path": "AppSyncIntegLogRetention/AssetParameters/d01c24641c7d8cb6488393ffceaefff282370a9a522bf9d77b21da73fa257347/ArtifactHash", "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.71" + "version": "10.1.85" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.71" + "version": "10.1.85" } }, "Exports": { @@ -351,20 +351,20 @@ "id": "Output{\"Fn::GetAtt\":[\"GraphqlApi1B6CF24C\",\"ApiId\"]}", "path": "AppSyncIntegLogRetention/Exports/Output{\"Fn::GetAtt\":[\"GraphqlApi1B6CF24C\",\"ApiId\"]}", "constructInfo": { - "fqn": "@aws-cdk/core.CfnOutput", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.71" + "version": "10.1.85" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.Stack", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "Integ": { @@ -380,7 +380,7 @@ "path": "Integ/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.71" + "version": "10.1.85" } }, "DeployAssert": { @@ -400,7 +400,7 @@ "path": "Integ/DefaultTest/DeployAssert/AwsApiCallCloudWatchLogsdescribeLogGroups/SdkProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.71" + "version": "10.1.85" } } }, @@ -417,14 +417,14 @@ "id": "Default", "path": "Integ/DefaultTest/DeployAssert/AwsApiCallCloudWatchLogsdescribeLogGroups/Default/Default", "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.CustomResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "AssertEqualsCloudWatchLogsdescribeLogGroups": { @@ -440,7 +440,7 @@ "path": "Integ/DefaultTest/DeployAssert/AwsApiCallCloudWatchLogsdescribeLogGroups/AssertEqualsCloudWatchLogsdescribeLogGroups/AssertionProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.71" + "version": "10.1.85" } } }, @@ -457,22 +457,22 @@ "id": "Default", "path": "Integ/DefaultTest/DeployAssert/AwsApiCallCloudWatchLogsdescribeLogGroups/AssertEqualsCloudWatchLogsdescribeLogGroups/Default/Default", "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.CustomResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "AssertionResults": { "id": "AssertionResults", "path": "Integ/DefaultTest/DeployAssert/AwsApiCallCloudWatchLogsdescribeLogGroups/AssertEqualsCloudWatchLogsdescribeLogGroups/AssertionResults", "constructInfo": { - "fqn": "@aws-cdk/core.CfnOutput", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, @@ -495,80 +495,80 @@ "id": "Staging", "path": "Integ/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Staging", "constructInfo": { - "fqn": "@aws-cdk/core.AssetStaging", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "Role": { "id": "Role", "path": "Integ/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Role", "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "Handler": { "id": "Handler", "path": "Integ/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Handler", "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.71" + "version": "10.1.85" } }, "AssetParameters": { "id": "AssetParameters", "path": "Integ/DefaultTest/DeployAssert/AssetParameters", "children": { - "0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd": { - "id": "0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd", - "path": "Integ/DefaultTest/DeployAssert/AssetParameters/0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd", + "84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7": { + "id": "84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7", + "path": "Integ/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7", "children": { "S3Bucket": { "id": "S3Bucket", - "path": "Integ/DefaultTest/DeployAssert/AssetParameters/0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd/S3Bucket", + "path": "Integ/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/S3Bucket", "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "S3VersionKey": { "id": "S3VersionKey", - "path": "Integ/DefaultTest/DeployAssert/AssetParameters/0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd/S3VersionKey", + "path": "Integ/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/S3VersionKey", "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "ArtifactHash": { "id": "ArtifactHash", - "path": "Integ/DefaultTest/DeployAssert/AssetParameters/0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd/ArtifactHash", + "path": "Integ/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/ArtifactHash", "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.71" + "version": "10.1.85" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.71" + "version": "10.1.85" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.Stack", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, @@ -585,8 +585,8 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/core.App", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-batch/test/job-definition.integ.snapshot/IntegTestBatchDefaultEnvVarsStackDefaultTestDeployAssertC15EFFF2.template.json b/packages/@aws-cdk/aws-batch/test/job-definition.integ.snapshot/IntegTestBatchDefaultEnvVarsStackDefaultTestDeployAssertC15EFFF2.template.json index f343518a8bc86..4d4755066daa6 100644 --- a/packages/@aws-cdk/aws-batch/test/job-definition.integ.snapshot/IntegTestBatchDefaultEnvVarsStackDefaultTestDeployAssertC15EFFF2.template.json +++ b/packages/@aws-cdk/aws-batch/test/job-definition.integ.snapshot/IntegTestBatchDefaultEnvVarsStackDefaultTestDeployAssertC15EFFF2.template.json @@ -15,7 +15,7 @@ "status": "ACTIVE" }, "flattenResponse": "true", - "salt": "1660823602154" + "salt": "1661796816631" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -36,7 +36,7 @@ ] }, "expected": "{\"$StringLike\":\"AWS_REGION\"}", - "salt": "1660823602155" + "salt": "1661796816632" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -88,7 +88,7 @@ "Runtime": "nodejs14.x", "Code": { "S3Bucket": { - "Ref": "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdS3BucketF94385B7" + "Ref": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3BucketA2BC9E80" }, "S3Key": { "Fn::Join": [ @@ -101,7 +101,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdS3VersionKey66DB0F9E" + "Ref": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3VersionKeyB8E92EFE" } ] } @@ -114,7 +114,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdS3VersionKey66DB0F9E" + "Ref": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3VersionKeyB8E92EFE" } ] } @@ -146,17 +146,17 @@ } }, "Parameters": { - "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdS3BucketF94385B7": { + "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3BucketA2BC9E80": { "Type": "String", - "Description": "S3 bucket for asset \"0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd\"" + "Description": "S3 bucket for asset \"84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7\"" }, - "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdS3VersionKey66DB0F9E": { + "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3VersionKeyB8E92EFE": { "Type": "String", - "Description": "S3 key for asset version \"0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd\"" + "Description": "S3 key for asset version \"84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7\"" }, - "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdArtifactHash2AC894D9": { + "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7ArtifactHashB8137036": { "Type": "String", - "Description": "Artifact hash for asset \"0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd\"" + "Description": "Artifact hash for asset \"84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7\"" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-batch/test/job-definition.integ.snapshot/asset.0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd.bundle/index.js b/packages/@aws-cdk/aws-batch/test/job-definition.integ.snapshot/asset.84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7.bundle/index.js old mode 100755 new mode 100644 similarity index 99% rename from packages/@aws-cdk/aws-batch/test/job-definition.integ.snapshot/asset.0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd.bundle/index.js rename to packages/@aws-cdk/aws-batch/test/job-definition.integ.snapshot/asset.84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7.bundle/index.js index b3ec1b8c53d30..ba956d47f51fe --- a/packages/@aws-cdk/aws-batch/test/job-definition.integ.snapshot/asset.0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd.bundle/index.js +++ b/packages/@aws-cdk/aws-batch/test/job-definition.integ.snapshot/asset.84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7.bundle/index.js @@ -493,7 +493,7 @@ var AssertionHandler = class extends CustomResourceHandler { } else { result = { data: JSON.stringify({ - status: "pass" + status: "success" }) }; } diff --git a/packages/@aws-cdk/aws-batch/test/job-definition.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-batch/test/job-definition.integ.snapshot/cdk.out index 588d7b269d34f..8ecc185e9dbee 100644 --- a/packages/@aws-cdk/aws-batch/test/job-definition.integ.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-batch/test/job-definition.integ.snapshot/cdk.out @@ -1 +1 @@ -{"version":"20.0.0"} \ No newline at end of file +{"version":"21.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-batch/test/job-definition.integ.snapshot/integ.json b/packages/@aws-cdk/aws-batch/test/job-definition.integ.snapshot/integ.json index 736943309c556..4fff561c7815d 100644 --- a/packages/@aws-cdk/aws-batch/test/job-definition.integ.snapshot/integ.json +++ b/packages/@aws-cdk/aws-batch/test/job-definition.integ.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "testCases": { "IntegTest-BatchDefaultEnvVarsStack/DefaultTest": { "stacks": [ @@ -8,7 +8,8 @@ "regions": [ "us-east-1" ], - "assertionStack": "IntegTest-BatchDefaultEnvVarsStack/DefaultTest/DeployAssert" + "assertionStack": "IntegTest-BatchDefaultEnvVarsStack/DefaultTest/DeployAssert", + "assertionStackName": "IntegTestBatchDefaultEnvVarsStackDefaultTestDeployAssertC15EFFF2" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-batch/test/job-definition.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-batch/test/job-definition.integ.snapshot/manifest.json index 485b343d781b7..1405bf2c4acaa 100644 --- a/packages/@aws-cdk/aws-batch/test/job-definition.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-batch/test/job-definition.integ.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "artifacts": { "Tree": { "type": "cdk:tree", @@ -36,13 +36,13 @@ { "type": "aws:cdk:asset", "data": { - "path": "asset.0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd.bundle", - "id": "0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd", + "path": "asset.84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7.bundle", + "id": "84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7", "packaging": "zip", - "sourceHash": "0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd", - "s3BucketParameter": "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdS3BucketF94385B7", - "s3KeyParameter": "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdS3VersionKey66DB0F9E", - "artifactHashParameter": "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdArtifactHash2AC894D9" + "sourceHash": "84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7", + "s3BucketParameter": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3BucketA2BC9E80", + "s3KeyParameter": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3VersionKeyB8E92EFE", + "artifactHashParameter": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7ArtifactHashB8137036" } } ], @@ -76,22 +76,22 @@ "data": "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F" } ], - "/IntegTest-BatchDefaultEnvVarsStack/DefaultTest/DeployAssert/AssetParameters/0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd/S3Bucket": [ + "/IntegTest-BatchDefaultEnvVarsStack/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/S3Bucket": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdS3BucketF94385B7" + "data": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3BucketA2BC9E80" } ], - "/IntegTest-BatchDefaultEnvVarsStack/DefaultTest/DeployAssert/AssetParameters/0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd/S3VersionKey": [ + "/IntegTest-BatchDefaultEnvVarsStack/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/S3VersionKey": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdS3VersionKey66DB0F9E" + "data": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3VersionKeyB8E92EFE" } ], - "/IntegTest-BatchDefaultEnvVarsStack/DefaultTest/DeployAssert/AssetParameters/0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd/ArtifactHash": [ + "/IntegTest-BatchDefaultEnvVarsStack/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/ArtifactHash": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdArtifactHash2AC894D9" + "data": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7ArtifactHashB8137036" } ] }, diff --git a/packages/@aws-cdk/aws-batch/test/job-definition.integ.snapshot/tree.json b/packages/@aws-cdk/aws-batch/test/job-definition.integ.snapshot/tree.json index dd66108f81c0e..324060f75a5a6 100644 --- a/packages/@aws-cdk/aws-batch/test/job-definition.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-batch/test/job-definition.integ.snapshot/tree.json @@ -9,7 +9,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.78" + "version": "10.1.85" } }, "BatchDefaultEnvVarsStack": { @@ -94,8 +94,8 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/core.Stack", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "IntegTest-BatchDefaultEnvVarsStack": { @@ -111,7 +111,7 @@ "path": "IntegTest-BatchDefaultEnvVarsStack/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.78" + "version": "10.1.85" } }, "DeployAssert": { @@ -131,7 +131,7 @@ "path": "IntegTest-BatchDefaultEnvVarsStack/DefaultTest/DeployAssert/AwsApiCallBatchdescribeJobDefinitions/SdkProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.78" + "version": "10.1.85" } } }, @@ -148,14 +148,14 @@ "id": "Default", "path": "IntegTest-BatchDefaultEnvVarsStack/DefaultTest/DeployAssert/AwsApiCallBatchdescribeJobDefinitions/Default/Default", "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.CustomResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "AssertEqualsBatchdescribeJobDefinitions": { @@ -171,7 +171,7 @@ "path": "IntegTest-BatchDefaultEnvVarsStack/DefaultTest/DeployAssert/AwsApiCallBatchdescribeJobDefinitions/AssertEqualsBatchdescribeJobDefinitions/AssertionProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.78" + "version": "10.1.85" } } }, @@ -188,22 +188,22 @@ "id": "Default", "path": "IntegTest-BatchDefaultEnvVarsStack/DefaultTest/DeployAssert/AwsApiCallBatchdescribeJobDefinitions/AssertEqualsBatchdescribeJobDefinitions/Default/Default", "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.CustomResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "AssertionResults": { "id": "AssertionResults", "path": "IntegTest-BatchDefaultEnvVarsStack/DefaultTest/DeployAssert/AwsApiCallBatchdescribeJobDefinitions/AssertEqualsBatchdescribeJobDefinitions/AssertionResults", "constructInfo": { - "fqn": "@aws-cdk/core.CfnOutput", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, @@ -226,80 +226,80 @@ "id": "Staging", "path": "IntegTest-BatchDefaultEnvVarsStack/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Staging", "constructInfo": { - "fqn": "@aws-cdk/core.AssetStaging", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "Role": { "id": "Role", "path": "IntegTest-BatchDefaultEnvVarsStack/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Role", "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "Handler": { "id": "Handler", "path": "IntegTest-BatchDefaultEnvVarsStack/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Handler", "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.78" + "version": "10.1.85" } }, "AssetParameters": { "id": "AssetParameters", "path": "IntegTest-BatchDefaultEnvVarsStack/DefaultTest/DeployAssert/AssetParameters", "children": { - "0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd": { - "id": "0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd", - "path": "IntegTest-BatchDefaultEnvVarsStack/DefaultTest/DeployAssert/AssetParameters/0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd", + "84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7": { + "id": "84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7", + "path": "IntegTest-BatchDefaultEnvVarsStack/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7", "children": { "S3Bucket": { "id": "S3Bucket", - "path": "IntegTest-BatchDefaultEnvVarsStack/DefaultTest/DeployAssert/AssetParameters/0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd/S3Bucket", + "path": "IntegTest-BatchDefaultEnvVarsStack/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/S3Bucket", "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "S3VersionKey": { "id": "S3VersionKey", - "path": "IntegTest-BatchDefaultEnvVarsStack/DefaultTest/DeployAssert/AssetParameters/0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd/S3VersionKey", + "path": "IntegTest-BatchDefaultEnvVarsStack/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/S3VersionKey", "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "ArtifactHash": { "id": "ArtifactHash", - "path": "IntegTest-BatchDefaultEnvVarsStack/DefaultTest/DeployAssert/AssetParameters/0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd/ArtifactHash", + "path": "IntegTest-BatchDefaultEnvVarsStack/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/ArtifactHash", "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.78" + "version": "10.1.85" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.78" + "version": "10.1.85" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.Stack", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, @@ -316,8 +316,8 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/core.App", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/FlowLogsDefaultTestDeployAssert6AFD1854.template.json b/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/FlowLogsDefaultTestDeployAssert6AFD1854.template.json index ac44adc18c7c3..edd0e54f89c68 100644 --- a/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/FlowLogsDefaultTestDeployAssert6AFD1854.template.json +++ b/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/FlowLogsDefaultTestDeployAssert6AFD1854.template.json @@ -30,7 +30,7 @@ } }, "flattenResponse": "false", - "salt": "1660924391599" + "salt": "1661796480503" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -51,7 +51,7 @@ ] }, "expected": "{\"$ObjectLike\":{\"KeyCount\":1}}", - "salt": "1660924391599" + "salt": "1661796480503" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -133,7 +133,7 @@ "Runtime": "nodejs14.x", "Code": { "S3Bucket": { - "Ref": "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdS3BucketF94385B7" + "Ref": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3BucketA2BC9E80" }, "S3Key": { "Fn::Join": [ @@ -146,7 +146,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdS3VersionKey66DB0F9E" + "Ref": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3VersionKeyB8E92EFE" } ] } @@ -159,7 +159,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdS3VersionKey66DB0F9E" + "Ref": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3VersionKeyB8E92EFE" } ] } @@ -191,17 +191,17 @@ } }, "Parameters": { - "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdS3BucketF94385B7": { + "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3BucketA2BC9E80": { "Type": "String", - "Description": "S3 bucket for asset \"0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd\"" + "Description": "S3 bucket for asset \"84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7\"" }, - "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdS3VersionKey66DB0F9E": { + "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3VersionKeyB8E92EFE": { "Type": "String", - "Description": "S3 key for asset version \"0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd\"" + "Description": "S3 key for asset version \"84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7\"" }, - "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdArtifactHash2AC894D9": { + "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7ArtifactHashB8137036": { "Type": "String", - "Description": "Artifact hash for asset \"0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd\"" + "Description": "Artifact hash for asset \"84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7\"" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/put-events.integ.snapshot/asset.0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd.bundle/index.js b/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/asset.84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7.bundle/index.js old mode 100755 new mode 100644 similarity index 99% rename from packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/put-events.integ.snapshot/asset.0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd.bundle/index.js rename to packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/asset.84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7.bundle/index.js index b3ec1b8c53d30..ba956d47f51fe --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/put-events.integ.snapshot/asset.0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd.bundle/index.js +++ b/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/asset.84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7.bundle/index.js @@ -493,7 +493,7 @@ var AssertionHandler = class extends CustomResourceHandler { } else { result = { data: JSON.stringify({ - status: "pass" + status: "success" }) }; } diff --git a/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/cdk.out index 588d7b269d34f..8ecc185e9dbee 100644 --- a/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/cdk.out @@ -1 +1 @@ -{"version":"20.0.0"} \ No newline at end of file +{"version":"21.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/integ.json b/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/integ.json index 465cf66252994..9bd00780726f5 100644 --- a/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/integ.json +++ b/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/integ.json @@ -1,12 +1,13 @@ { - "version": "20.0.0", + "version": "21.0.0", "testCases": { "FlowLogs/DefaultTest": { "stacks": [ "FlowLogsTestStack", "FlowLogsFeatureFlag" ], - "assertionStack": "FlowLogs/DefaultTest/DeployAssert" + "assertionStack": "FlowLogs/DefaultTest/DeployAssert", + "assertionStackName": "FlowLogsDefaultTestDeployAssert6AFD1854" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/manifest.json index cbe7726f31c2c..625ddb5bc8751 100644 --- a/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "artifacts": { "Tree": { "type": "cdk:tree", @@ -508,13 +508,13 @@ { "type": "aws:cdk:asset", "data": { - "path": "asset.0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd.bundle", - "id": "0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd", + "path": "asset.84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7.bundle", + "id": "84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7", "packaging": "zip", - "sourceHash": "0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd", - "s3BucketParameter": "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdS3BucketF94385B7", - "s3KeyParameter": "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdS3VersionKey66DB0F9E", - "artifactHashParameter": "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdArtifactHash2AC894D9" + "sourceHash": "84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7", + "s3BucketParameter": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3BucketA2BC9E80", + "s3KeyParameter": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3VersionKeyB8E92EFE", + "artifactHashParameter": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7ArtifactHashB8137036" } } ], @@ -548,22 +548,22 @@ "data": "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F" } ], - "/FlowLogs/DefaultTest/DeployAssert/AssetParameters/0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd/S3Bucket": [ + "/FlowLogs/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/S3Bucket": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdS3BucketF94385B7" + "data": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3BucketA2BC9E80" } ], - "/FlowLogs/DefaultTest/DeployAssert/AssetParameters/0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd/S3VersionKey": [ + "/FlowLogs/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/S3VersionKey": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdS3VersionKey66DB0F9E" + "data": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3VersionKeyB8E92EFE" } ], - "/FlowLogs/DefaultTest/DeployAssert/AssetParameters/0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd/ArtifactHash": [ + "/FlowLogs/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/ArtifactHash": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdArtifactHash2AC894D9" + "data": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7ArtifactHashB8137036" } ] }, diff --git a/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/tree.json b/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/tree.json index 801b62da2f16a..079e2f28b821d 100644 --- a/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-ec2/test/vpc-flow-logs.integ.snapshot/tree.json @@ -9,7 +9,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.78" + "version": "10.1.85" } }, "FlowLogsFeatureFlag": { @@ -91,8 +91,8 @@ "id": "Acl", "path": "FlowLogsFeatureFlag/VPC/PublicSubnet1/Acl", "constructInfo": { - "fqn": "@aws-cdk/core.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "RouteTable": { @@ -258,8 +258,8 @@ "id": "Acl", "path": "FlowLogsFeatureFlag/VPC/PublicSubnet2/Acl", "constructInfo": { - "fqn": "@aws-cdk/core.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "RouteTable": { @@ -425,8 +425,8 @@ "id": "Acl", "path": "FlowLogsFeatureFlag/VPC/PrivateSubnet1/Acl", "constructInfo": { - "fqn": "@aws-cdk/core.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "RouteTable": { @@ -544,8 +544,8 @@ "id": "Acl", "path": "FlowLogsFeatureFlag/VPC/PrivateSubnet2/Acl", "constructInfo": { - "fqn": "@aws-cdk/core.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "RouteTable": { @@ -1074,22 +1074,22 @@ "id": "Output{\"Fn::GetAtt\":[\"VPCFlowLogsS3BucketFB7DC2BE\",\"Arn\"]}", "path": "FlowLogsFeatureFlag/Exports/Output{\"Fn::GetAtt\":[\"VPCFlowLogsS3BucketFB7DC2BE\",\"Arn\"]}", "constructInfo": { - "fqn": "@aws-cdk/core.CfnOutput", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "Output{\"Ref\":\"VPCFlowLogsS3BucketFB7DC2BE\"}": { "id": "Output{\"Ref\":\"VPCFlowLogsS3BucketFB7DC2BE\"}", "path": "FlowLogsFeatureFlag/Exports/Output{\"Ref\":\"VPCFlowLogsS3BucketFB7DC2BE\"}", "constructInfo": { - "fqn": "@aws-cdk/core.CfnOutput", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.78" + "version": "10.1.85" } }, "FlowLogsInstance": { @@ -1263,22 +1263,22 @@ "id": "SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn2-ami-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "path": "FlowLogsFeatureFlag/SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn2-ami-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118.Parameter", "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn2-ami-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118": { "id": "SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn2-ami-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118", "path": "FlowLogsFeatureFlag/SsmParameterValue:--aws--service--ami-amazon-linux-latest--amzn2-ami-hvm-x86_64-gp2:C96584B6-F00A-464E-AD19-53AFF4B05118", "constructInfo": { - "fqn": "@aws-cdk/core.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.Stack", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "FlowLogsTestStack": { @@ -1360,8 +1360,8 @@ "id": "Acl", "path": "FlowLogsTestStack/VPC/PublicSubnet1/Acl", "constructInfo": { - "fqn": "@aws-cdk/core.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "RouteTable": { @@ -1527,8 +1527,8 @@ "id": "Acl", "path": "FlowLogsTestStack/VPC/PublicSubnet2/Acl", "constructInfo": { - "fqn": "@aws-cdk/core.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "RouteTable": { @@ -1694,8 +1694,8 @@ "id": "Acl", "path": "FlowLogsTestStack/VPC/PrivateSubnet1/Acl", "constructInfo": { - "fqn": "@aws-cdk/core.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "RouteTable": { @@ -1813,8 +1813,8 @@ "id": "Acl", "path": "FlowLogsTestStack/VPC/PrivateSubnet2/Acl", "constructInfo": { - "fqn": "@aws-cdk/core.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "RouteTable": { @@ -2553,14 +2553,14 @@ "id": "Default", "path": "FlowLogsTestStack/Bucket/AutoDeleteObjectsCustomResource/Default", "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.CustomResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, @@ -2577,30 +2577,30 @@ "id": "Staging", "path": "FlowLogsTestStack/Custom::S3AutoDeleteObjectsCustomResourceProvider/Staging", "constructInfo": { - "fqn": "@aws-cdk/core.AssetStaging", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "Role": { "id": "Role", "path": "FlowLogsTestStack/Custom::S3AutoDeleteObjectsCustomResourceProvider/Role", "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "Handler": { "id": "Handler", "path": "FlowLogsTestStack/Custom::S3AutoDeleteObjectsCustomResourceProvider/Handler", "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.CustomResourceProvider", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "AssetParameters": { @@ -2615,42 +2615,42 @@ "id": "S3Bucket", "path": "FlowLogsTestStack/AssetParameters/60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26/S3Bucket", "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "S3VersionKey": { "id": "S3VersionKey", "path": "FlowLogsTestStack/AssetParameters/60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26/S3VersionKey", "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "ArtifactHash": { "id": "ArtifactHash", "path": "FlowLogsTestStack/AssetParameters/60767da3831353fede3cfe92efef10580a600592dec8ccbb06c051e95b9c1b26/ArtifactHash", "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.78" + "version": "10.1.85" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.78" + "version": "10.1.85" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.Stack", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "FlowLogs": { @@ -2666,7 +2666,7 @@ "path": "FlowLogs/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.78" + "version": "10.1.85" } }, "DeployAssert": { @@ -2686,7 +2686,7 @@ "path": "FlowLogs/DefaultTest/DeployAssert/AwsApiCallS3listObjectsV2/SdkProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.78" + "version": "10.1.85" } } }, @@ -2703,14 +2703,14 @@ "id": "Default", "path": "FlowLogs/DefaultTest/DeployAssert/AwsApiCallS3listObjectsV2/Default/Default", "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.CustomResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "AssertEqualsS3listObjectsV2": { @@ -2726,7 +2726,7 @@ "path": "FlowLogs/DefaultTest/DeployAssert/AwsApiCallS3listObjectsV2/AssertEqualsS3listObjectsV2/AssertionProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.78" + "version": "10.1.85" } } }, @@ -2743,22 +2743,22 @@ "id": "Default", "path": "FlowLogs/DefaultTest/DeployAssert/AwsApiCallS3listObjectsV2/AssertEqualsS3listObjectsV2/Default/Default", "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.CustomResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "AssertionResults": { "id": "AssertionResults", "path": "FlowLogs/DefaultTest/DeployAssert/AwsApiCallS3listObjectsV2/AssertEqualsS3listObjectsV2/AssertionResults", "constructInfo": { - "fqn": "@aws-cdk/core.CfnOutput", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, @@ -2781,80 +2781,80 @@ "id": "Staging", "path": "FlowLogs/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Staging", "constructInfo": { - "fqn": "@aws-cdk/core.AssetStaging", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "Role": { "id": "Role", "path": "FlowLogs/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Role", "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "Handler": { "id": "Handler", "path": "FlowLogs/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Handler", "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.78" + "version": "10.1.85" } }, "AssetParameters": { "id": "AssetParameters", "path": "FlowLogs/DefaultTest/DeployAssert/AssetParameters", "children": { - "0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd": { - "id": "0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd", - "path": "FlowLogs/DefaultTest/DeployAssert/AssetParameters/0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd", + "84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7": { + "id": "84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7", + "path": "FlowLogs/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7", "children": { "S3Bucket": { "id": "S3Bucket", - "path": "FlowLogs/DefaultTest/DeployAssert/AssetParameters/0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd/S3Bucket", + "path": "FlowLogs/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/S3Bucket", "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "S3VersionKey": { "id": "S3VersionKey", - "path": "FlowLogs/DefaultTest/DeployAssert/AssetParameters/0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd/S3VersionKey", + "path": "FlowLogs/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/S3VersionKey", "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "ArtifactHash": { "id": "ArtifactHash", - "path": "FlowLogs/DefaultTest/DeployAssert/AssetParameters/0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd/ArtifactHash", + "path": "FlowLogs/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/ArtifactHash", "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.78" + "version": "10.1.85" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.78" + "version": "10.1.85" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.Stack", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, @@ -2871,8 +2871,8 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/core.App", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-events-targets/test/logs/log-group.integ.snapshot/LogGroupDefaultTestDeployAssert353EE07A.template.json b/packages/@aws-cdk/aws-events-targets/test/logs/log-group.integ.snapshot/LogGroupDefaultTestDeployAssert353EE07A.template.json index 4f7be1d2b933a..8e7ef7600601a 100644 --- a/packages/@aws-cdk/aws-events-targets/test/logs/log-group.integ.snapshot/LogGroupDefaultTestDeployAssert353EE07A.template.json +++ b/packages/@aws-cdk/aws-events-targets/test/logs/log-group.integ.snapshot/LogGroupDefaultTestDeployAssert353EE07A.template.json @@ -14,14 +14,14 @@ "parameters": { "Entries": [ { - "Detail": "{\"date\":\"abc1655234384146\"}", + "Detail": "{\"date\":\"abc1661796816664\"}", "DetailType": "cdk-integ-custom-rule", "Source": "cdk-integ" } ] }, "flattenResponse": "false", - "salt": "1655234384148" + "salt": "1661796816666" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -91,7 +91,7 @@ "Runtime": "nodejs14.x", "Code": { "S3Bucket": { - "Ref": "AssetParameters41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736S3BucketA9F12763" + "Ref": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3BucketA2BC9E80" }, "S3Key": { "Fn::Join": [ @@ -104,7 +104,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736S3VersionKey589F30A2" + "Ref": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3VersionKeyB8E92EFE" } ] } @@ -117,7 +117,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736S3VersionKey589F30A2" + "Ref": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3VersionKeyB8E92EFE" } ] } @@ -152,11 +152,11 @@ "logGroupName": { "Fn::ImportValue": "log-group-events:ExportsOutputRefloggroup2F19C5C9B4F4C6918" }, - "startTime": "1655234384146", + "startTime": "1661796816664", "limit": 1 }, "flattenResponse": "true", - "salt": "1655234384149" + "salt": "1661796816667" }, "DependsOn": [ "AwsApiCallEventBridgeputEvents" @@ -179,8 +179,8 @@ "apiCallResponse.events.0.message" ] }, - "expected": "{\"$StringLike\":\"abc1655234384146\"}", - "salt": "1655234384149" + "expected": "{\"$StringLike\":\"abc1661796816664\"}", + "salt": "1661796816667" }, "DependsOn": [ "AwsApiCallEventBridgeputEvents" @@ -190,17 +190,17 @@ } }, "Parameters": { - "AssetParameters41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736S3BucketA9F12763": { + "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3BucketA2BC9E80": { "Type": "String", - "Description": "S3 bucket for asset \"41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736\"" + "Description": "S3 bucket for asset \"84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7\"" }, - "AssetParameters41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736S3VersionKey589F30A2": { + "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3VersionKeyB8E92EFE": { "Type": "String", - "Description": "S3 key for asset version \"41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736\"" + "Description": "S3 key for asset version \"84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7\"" }, - "AssetParameters41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736ArtifactHash2CC614EA": { + "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7ArtifactHashB8137036": { "Type": "String", - "Description": "Artifact hash for asset \"41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736\"" + "Description": "Artifact hash for asset \"84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7\"" } }, "Outputs": { diff --git a/packages/@aws-cdk/aws-events-targets/test/logs/log-group.integ.snapshot/asset.105b4f39ae68785e705640aa91919e412fcba2dd454aca53412747be8d955286/index.js b/packages/@aws-cdk/aws-events-targets/test/logs/log-group.integ.snapshot/asset.105b4f39ae68785e705640aa91919e412fcba2dd454aca53412747be8d955286/index.js new file mode 100644 index 0000000000000..7bae87b06d44d --- /dev/null +++ b/packages/@aws-cdk/aws-events-targets/test/logs/log-group.integ.snapshot/asset.105b4f39ae68785e705640aa91919e412fcba2dd454aca53412747be8d955286/index.js @@ -0,0 +1,252 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.handler = exports.forceSdkInstallation = exports.flatten = exports.PHYSICAL_RESOURCE_ID_REFERENCE = void 0; +/* eslint-disable no-console */ +const child_process_1 = require("child_process"); +const fs = require("fs"); +const path_1 = require("path"); +/** + * Serialized form of the physical resource id for use in the operation parameters + */ +exports.PHYSICAL_RESOURCE_ID_REFERENCE = 'PHYSICAL:RESOURCEID:'; +/** + * Flattens a nested object + * + * @param object the object to be flattened + * @returns a flat object with path as keys + */ +function flatten(object) { + return Object.assign({}, ...function _flatten(child, path = []) { + return [].concat(...Object.keys(child) + .map(key => { + const childKey = Buffer.isBuffer(child[key]) ? child[key].toString('utf8') : child[key]; + return typeof childKey === 'object' && childKey !== null + ? _flatten(childKey, path.concat([key])) + : ({ [path.concat([key]).join('.')]: childKey }); + })); + }(object)); +} +exports.flatten = flatten; +/** + * Decodes encoded special values (physicalResourceId) + */ +function decodeSpecialValues(object, physicalResourceId) { + return JSON.parse(JSON.stringify(object), (_k, v) => { + switch (v) { + case exports.PHYSICAL_RESOURCE_ID_REFERENCE: + return physicalResourceId; + default: + return v; + } + }); +} +/** + * Filters the keys of an object. + */ +function filterKeys(object, pred) { + return Object.entries(object) + .reduce((acc, [k, v]) => pred(k) + ? { ...acc, [k]: v } + : acc, {}); +} +let latestSdkInstalled = false; +function forceSdkInstallation() { + latestSdkInstalled = false; +} +exports.forceSdkInstallation = forceSdkInstallation; +/** + * Installs latest AWS SDK v2 + */ +function installLatestSdk() { + console.log('Installing latest AWS SDK v2'); + // Both HOME and --prefix are needed here because /tmp is the only writable location + child_process_1.execSync('HOME=/tmp npm install aws-sdk@2 --production --no-package-lock --no-save --prefix /tmp'); + latestSdkInstalled = true; +} +// no currently patched services +const patchedServices = []; +/** + * Patches the AWS SDK by loading service models in the same manner as the actual SDK + */ +function patchSdk(awsSdk) { + const apiLoader = awsSdk.apiLoader; + patchedServices.forEach(({ serviceName, apiVersions }) => { + const lowerServiceName = serviceName.toLowerCase(); + if (!awsSdk.Service.hasService(lowerServiceName)) { + apiLoader.services[lowerServiceName] = {}; + awsSdk[serviceName] = awsSdk.Service.defineService(lowerServiceName, apiVersions); + } + else { + awsSdk.Service.addVersions(awsSdk[serviceName], apiVersions); + } + apiVersions.forEach(apiVersion => { + Object.defineProperty(apiLoader.services[lowerServiceName], apiVersion, { + get: function get() { + const modelFilePrefix = `aws-sdk-patch/${lowerServiceName}-${apiVersion}`; + const model = JSON.parse(fs.readFileSync(path_1.join(__dirname, `${modelFilePrefix}.service.json`), 'utf-8')); + model.paginators = JSON.parse(fs.readFileSync(path_1.join(__dirname, `${modelFilePrefix}.paginators.json`), 'utf-8')).pagination; + return model; + }, + enumerable: true, + configurable: true, + }); + }); + }); + return awsSdk; +} +/* eslint-disable @typescript-eslint/no-require-imports, import/no-extraneous-dependencies */ +async function handler(event, context) { + try { + let AWS; + if (!latestSdkInstalled && event.ResourceProperties.InstallLatestAwsSdk === 'true') { + try { + installLatestSdk(); + AWS = require('/tmp/node_modules/aws-sdk'); + } + catch (e) { + console.log(`Failed to install latest AWS SDK v2: ${e}`); + AWS = require('aws-sdk'); // Fallback to pre-installed version + } + } + else if (latestSdkInstalled) { + AWS = require('/tmp/node_modules/aws-sdk'); + } + else { + AWS = require('aws-sdk'); + } + try { + AWS = patchSdk(AWS); + } + catch (e) { + console.log(`Failed to patch AWS SDK: ${e}. Proceeding with the installed copy.`); + } + console.log(JSON.stringify({ ...event, ResponseURL: '...' })); + console.log('AWS SDK VERSION: ' + AWS.VERSION); + event.ResourceProperties.Create = decodeCall(event.ResourceProperties.Create); + event.ResourceProperties.Update = decodeCall(event.ResourceProperties.Update); + event.ResourceProperties.Delete = decodeCall(event.ResourceProperties.Delete); + // Default physical resource id + let physicalResourceId; + switch (event.RequestType) { + case 'Create': + physicalResourceId = event.ResourceProperties.Create?.physicalResourceId?.id ?? + event.ResourceProperties.Update?.physicalResourceId?.id ?? + event.ResourceProperties.Delete?.physicalResourceId?.id ?? + event.LogicalResourceId; + break; + case 'Update': + case 'Delete': + physicalResourceId = event.ResourceProperties[event.RequestType]?.physicalResourceId?.id ?? event.PhysicalResourceId; + break; + } + let flatData = {}; + let data = {}; + const call = event.ResourceProperties[event.RequestType]; + if (call) { + let credentials; + if (call.assumedRoleArn) { + const timestamp = (new Date()).getTime(); + const params = { + RoleArn: call.assumedRoleArn, + RoleSessionName: `${timestamp}-${physicalResourceId}`.substring(0, 64), + }; + credentials = new AWS.ChainableTemporaryCredentials({ + params: params, + }); + } + if (!Object.prototype.hasOwnProperty.call(AWS, call.service)) { + throw Error(`Service ${call.service} does not exist in AWS SDK version ${AWS.VERSION}.`); + } + const awsService = new AWS[call.service]({ + apiVersion: call.apiVersion, + credentials: credentials, + region: call.region, + }); + try { + const response = await awsService[call.action](call.parameters && decodeSpecialValues(call.parameters, physicalResourceId)).promise(); + flatData = { + apiVersion: awsService.config.apiVersion, + region: awsService.config.region, + ...flatten(response), + }; + let outputPaths; + if (call.outputPath) { + outputPaths = [call.outputPath]; + } + else if (call.outputPaths) { + outputPaths = call.outputPaths; + } + if (outputPaths) { + data = filterKeys(flatData, startsWithOneOf(outputPaths)); + } + else { + data = flatData; + } + } + catch (e) { + if (!call.ignoreErrorCodesMatching || !new RegExp(call.ignoreErrorCodesMatching).test(e.code)) { + throw e; + } + } + if (call.physicalResourceId?.responsePath) { + physicalResourceId = flatData[call.physicalResourceId.responsePath]; + } + } + await respond('SUCCESS', 'OK', physicalResourceId, data); + } + catch (e) { + console.log(e); + await respond('FAILED', e.message || 'Internal Error', context.logStreamName, {}); + } + function respond(responseStatus, reason, physicalResourceId, data) { + const responseBody = JSON.stringify({ + Status: responseStatus, + Reason: reason, + PhysicalResourceId: physicalResourceId, + StackId: event.StackId, + RequestId: event.RequestId, + LogicalResourceId: event.LogicalResourceId, + NoEcho: false, + Data: data, + }); + console.log('Responding', responseBody); + // eslint-disable-next-line @typescript-eslint/no-require-imports + const parsedUrl = require('url').parse(event.ResponseURL); + const requestOptions = { + hostname: parsedUrl.hostname, + path: parsedUrl.path, + method: 'PUT', + headers: { 'content-type': '', 'content-length': responseBody.length }, + }; + return new Promise((resolve, reject) => { + try { + // eslint-disable-next-line @typescript-eslint/no-require-imports + const request = require('https').request(requestOptions, resolve); + request.on('error', reject); + request.write(responseBody); + request.end(); + } + catch (e) { + reject(e); + } + }); + } +} +exports.handler = handler; +function decodeCall(call) { + if (!call) { + return undefined; + } + return JSON.parse(call); +} +function startsWithOneOf(searchStrings) { + return function (string) { + for (const searchString of searchStrings) { + if (string.startsWith(searchString)) { + return true; + } + } + return false; + }; +} +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSwrQkFBK0I7QUFDL0IsaURBQXlDO0FBQ3pDLHlCQUF5QjtBQUN6QiwrQkFBNEI7QUFTNUI7O0dBRUc7QUFDVSxRQUFBLDhCQUE4QixHQUFHLHNCQUFzQixDQUFDO0FBRXJFOzs7OztHQUtHO0FBQ0gsU0FBZ0IsT0FBTyxDQUFDLE1BQWM7SUFDcEMsT0FBTyxNQUFNLENBQUMsTUFBTSxDQUNsQixFQUFFLEVBQ0YsR0FBRyxTQUFTLFFBQVEsQ0FBQyxLQUFVLEVBQUUsT0FBaUIsRUFBRTtRQUNsRCxPQUFPLEVBQUUsQ0FBQyxNQUFNLENBQUMsR0FBRyxNQUFNLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQzthQUNuQyxHQUFHLENBQUMsR0FBRyxDQUFDLEVBQUU7WUFDVCxNQUFNLFFBQVEsR0FBRyxNQUFNLENBQUMsUUFBUSxDQUFDLEtBQUssQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxLQUFLLENBQUMsR0FBRyxDQUFDLENBQUMsUUFBUSxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUMsQ0FB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uICAgICAgfVxuICAgIH1cbiAgICByZXR1cm4gZmFsc2U7XG4gIH07XG59XG4iXX0= \ No newline at end of file diff --git a/packages/@aws-cdk/aws-events-targets/test/logs/log-group.integ.snapshot/asset.41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736.bundle/index.js b/packages/@aws-cdk/aws-events-targets/test/logs/log-group.integ.snapshot/asset.41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736.bundle/index.js deleted file mode 100755 index 83f8199656820..0000000000000 --- a/packages/@aws-cdk/aws-events-targets/test/logs/log-group.integ.snapshot/asset.41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736.bundle/index.js +++ /dev/null @@ -1,617 +0,0 @@ -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getOwnPropSymbols = Object.getOwnPropertySymbols; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __propIsEnum = Object.prototype.propertyIsEnumerable; -var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; -var __spreadValues = (a, b) => { - for (var prop in b || (b = {})) - if (__hasOwnProp.call(b, prop)) - __defNormalProp(a, prop, b[prop]); - if (__getOwnPropSymbols) - for (var prop of __getOwnPropSymbols(b)) { - if (__propIsEnum.call(b, prop)) - __defNormalProp(a, prop, b[prop]); - } - return a; -}; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// lib/assertions/providers/lambda-handler/index.ts -var lambda_handler_exports = {}; -__export(lambda_handler_exports, { - handler: () => handler -}); -module.exports = __toCommonJS(lambda_handler_exports); - -// ../assertions/lib/matcher.ts -var Matcher = class { - static isMatcher(x) { - return x && x instanceof Matcher; - } -}; -var MatchResult = class { - constructor(target) { - this.failures = []; - this.captures = /* @__PURE__ */ new Map(); - this.finalized = false; - this.target = target; - } - push(matcher, path, message) { - return this.recordFailure({ matcher, path, message }); - } - recordFailure(failure) { - this.failures.push(failure); - return this; - } - hasFailed() { - return this.failures.length !== 0; - } - get failCount() { - return this.failures.length; - } - compose(id, inner) { - const innerF = inner.failures; - this.failures.push(...innerF.map((f) => { - return { path: [id, ...f.path], message: f.message, matcher: f.matcher }; - })); - inner.captures.forEach((vals, capture) => { - vals.forEach((value) => this.recordCapture({ capture, value })); - }); - return this; - } - finished() { - if (this.finalized) { - return this; - } - if (this.failCount === 0) { - this.captures.forEach((vals, cap) => cap._captured.push(...vals)); - } - this.finalized = true; - return this; - } - toHumanStrings() { - return this.failures.map((r) => { - const loc = r.path.length === 0 ? "" : ` at ${r.path.join("")}`; - return "" + r.message + loc + ` (using ${r.matcher.name} matcher)`; - }); - } - recordCapture(options) { - let values = this.captures.get(options.capture); - if (values === void 0) { - values = []; - } - values.push(options.value); - this.captures.set(options.capture, values); - } -}; - -// ../assertions/lib/private/matchers/absent.ts -var AbsentMatch = class extends Matcher { - constructor(name) { - super(); - this.name = name; - } - test(actual) { - const result = new MatchResult(actual); - if (actual !== void 0) { - result.recordFailure({ - matcher: this, - path: [], - message: `Received ${actual}, but key should be absent` - }); - } - return result; - } -}; - -// ../assertions/lib/private/type.ts -function getType(obj) { - return Array.isArray(obj) ? "array" : typeof obj; -} - -// ../assertions/lib/match.ts -var Match = class { - static absent() { - return new AbsentMatch("absent"); - } - static arrayWith(pattern) { - return new ArrayMatch("arrayWith", pattern); - } - static arrayEquals(pattern) { - return new ArrayMatch("arrayEquals", pattern, { subsequence: false }); - } - static exact(pattern) { - return new LiteralMatch("exact", pattern, { partialObjects: false }); - } - static objectLike(pattern) { - return new ObjectMatch("objectLike", pattern); - } - static objectEquals(pattern) { - return new ObjectMatch("objectEquals", pattern, { partial: false }); - } - static not(pattern) { - return new NotMatch("not", pattern); - } - static serializedJson(pattern) { - return new SerializedJson("serializedJson", pattern); - } - static anyValue() { - return new AnyMatch("anyValue"); - } - static stringLikeRegexp(pattern) { - return new StringLikeRegexpMatch("stringLikeRegexp", pattern); - } -}; -var LiteralMatch = class extends Matcher { - constructor(name, pattern, options = {}) { - super(); - this.name = name; - this.pattern = pattern; - this.partialObjects = options.partialObjects ?? false; - if (Matcher.isMatcher(this.pattern)) { - throw new Error("LiteralMatch cannot directly contain another matcher. Remove the top-level matcher or nest it more deeply."); - } - } - test(actual) { - if (Array.isArray(this.pattern)) { - return new ArrayMatch(this.name, this.pattern, { subsequence: false, partialObjects: this.partialObjects }).test(actual); - } - if (typeof this.pattern === "object") { - return new ObjectMatch(this.name, this.pattern, { partial: this.partialObjects }).test(actual); - } - const result = new MatchResult(actual); - if (typeof this.pattern !== typeof actual) { - result.recordFailure({ - matcher: this, - path: [], - message: `Expected type ${typeof this.pattern} but received ${getType(actual)}` - }); - return result; - } - if (actual !== this.pattern) { - result.recordFailure({ - matcher: this, - path: [], - message: `Expected ${this.pattern} but received ${actual}` - }); - } - return result; - } -}; -var ArrayMatch = class extends Matcher { - constructor(name, pattern, options = {}) { - super(); - this.name = name; - this.pattern = pattern; - this.subsequence = options.subsequence ?? true; - this.partialObjects = options.partialObjects ?? false; - } - test(actual) { - if (!Array.isArray(actual)) { - return new MatchResult(actual).recordFailure({ - matcher: this, - path: [], - message: `Expected type array but received ${getType(actual)}` - }); - } - if (!this.subsequence && this.pattern.length !== actual.length) { - return new MatchResult(actual).recordFailure({ - matcher: this, - path: [], - message: `Expected array of length ${this.pattern.length} but received ${actual.length}` - }); - } - let patternIdx = 0; - let actualIdx = 0; - const result = new MatchResult(actual); - while (patternIdx < this.pattern.length && actualIdx < actual.length) { - const patternElement = this.pattern[patternIdx]; - const matcher = Matcher.isMatcher(patternElement) ? patternElement : new LiteralMatch(this.name, patternElement, { partialObjects: this.partialObjects }); - const matcherName = matcher.name; - if (this.subsequence && (matcherName == "absent" || matcherName == "anyValue")) { - throw new Error(`The Matcher ${matcherName}() cannot be nested within arrayWith()`); - } - const innerResult = matcher.test(actual[actualIdx]); - if (!this.subsequence || !innerResult.hasFailed()) { - result.compose(`[${actualIdx}]`, innerResult); - patternIdx++; - actualIdx++; - } else { - actualIdx++; - } - } - for (; patternIdx < this.pattern.length; patternIdx++) { - const pattern = this.pattern[patternIdx]; - const element = Matcher.isMatcher(pattern) || typeof pattern === "object" ? " " : ` [${pattern}] `; - result.recordFailure({ - matcher: this, - path: [], - message: `Missing element${element}at pattern index ${patternIdx}` - }); - } - return result; - } -}; -var ObjectMatch = class extends Matcher { - constructor(name, pattern, options = {}) { - super(); - this.name = name; - this.pattern = pattern; - this.partial = options.partial ?? true; - } - test(actual) { - if (typeof actual !== "object" || Array.isArray(actual)) { - return new MatchResult(actual).recordFailure({ - matcher: this, - path: [], - message: `Expected type object but received ${getType(actual)}` - }); - } - const result = new MatchResult(actual); - if (!this.partial) { - for (const a of Object.keys(actual)) { - if (!(a in this.pattern)) { - result.recordFailure({ - matcher: this, - path: [`/${a}`], - message: "Unexpected key" - }); - } - } - } - for (const [patternKey, patternVal] of Object.entries(this.pattern)) { - if (!(patternKey in actual) && !(patternVal instanceof AbsentMatch)) { - result.recordFailure({ - matcher: this, - path: [`/${patternKey}`], - message: `Missing key '${patternKey}' among {${Object.keys(actual).join(",")}}` - }); - continue; - } - const matcher = Matcher.isMatcher(patternVal) ? patternVal : new LiteralMatch(this.name, patternVal, { partialObjects: this.partial }); - const inner = matcher.test(actual[patternKey]); - result.compose(`/${patternKey}`, inner); - } - return result; - } -}; -var SerializedJson = class extends Matcher { - constructor(name, pattern) { - super(); - this.name = name; - this.pattern = pattern; - } - test(actual) { - const result = new MatchResult(actual); - if (getType(actual) !== "string") { - result.recordFailure({ - matcher: this, - path: [], - message: `Expected JSON as a string but found ${getType(actual)}` - }); - return result; - } - let parsed; - try { - parsed = JSON.parse(actual); - } catch (err) { - if (err instanceof SyntaxError) { - result.recordFailure({ - matcher: this, - path: [], - message: `Invalid JSON string: ${actual}` - }); - return result; - } else { - throw err; - } - } - const matcher = Matcher.isMatcher(this.pattern) ? this.pattern : new LiteralMatch(this.name, this.pattern); - const innerResult = matcher.test(parsed); - result.compose(`(${this.name})`, innerResult); - return result; - } -}; -var NotMatch = class extends Matcher { - constructor(name, pattern) { - super(); - this.name = name; - this.pattern = pattern; - } - test(actual) { - const matcher = Matcher.isMatcher(this.pattern) ? this.pattern : new LiteralMatch(this.name, this.pattern); - const innerResult = matcher.test(actual); - const result = new MatchResult(actual); - if (innerResult.failCount === 0) { - result.recordFailure({ - matcher: this, - path: [], - message: `Found unexpected match: ${JSON.stringify(actual, void 0, 2)}` - }); - } - return result; - } -}; -var AnyMatch = class extends Matcher { - constructor(name) { - super(); - this.name = name; - } - test(actual) { - const result = new MatchResult(actual); - if (actual == null) { - result.recordFailure({ - matcher: this, - path: [], - message: "Expected a value but found none" - }); - } - return result; - } -}; -var StringLikeRegexpMatch = class extends Matcher { - constructor(name, pattern) { - super(); - this.name = name; - this.pattern = pattern; - } - test(actual) { - const result = new MatchResult(actual); - const regex = new RegExp(this.pattern, "gm"); - if (typeof actual !== "string") { - result.recordFailure({ - matcher: this, - path: [], - message: `Expected a string, but got '${typeof actual}'` - }); - } - if (!regex.test(actual)) { - result.recordFailure({ - matcher: this, - path: [], - message: `String '${actual}' did not match pattern '${this.pattern}'` - }); - } - return result; - } -}; - -// lib/assertions/providers/lambda-handler/base.ts -var https = __toESM(require("https")); -var url = __toESM(require("url")); -var CustomResourceHandler = class { - constructor(event, context) { - this.event = event; - this.context = context; - this.timedOut = false; - this.timeout = setTimeout(async () => { - await this.respond({ - status: "FAILED", - reason: "Lambda Function Timeout", - data: this.context.logStreamName - }); - this.timedOut = true; - }, context.getRemainingTimeInMillis() - 1200); - this.event = event; - this.physicalResourceId = extractPhysicalResourceId(event); - } - async handle() { - try { - console.log(`Event: ${JSON.stringify(this.event)}`); - const response = await this.processEvent(this.event.ResourceProperties); - console.log(`Event output : ${JSON.stringify(response)}`); - await this.respond({ - status: "SUCCESS", - reason: "OK", - data: response - }); - } catch (e) { - console.log(e); - await this.respond({ - status: "FAILED", - reason: e.message ?? "Internal Error" - }); - } finally { - clearTimeout(this.timeout); - } - } - respond(response) { - if (this.timedOut) { - return; - } - const cfResponse = { - Status: response.status, - Reason: response.reason, - PhysicalResourceId: this.physicalResourceId, - StackId: this.event.StackId, - RequestId: this.event.RequestId, - LogicalResourceId: this.event.LogicalResourceId, - NoEcho: false, - Data: response.data - }; - const responseBody = JSON.stringify(cfResponse); - console.log("Responding to CloudFormation", responseBody); - const parsedUrl = url.parse(this.event.ResponseURL); - const requestOptions = { - hostname: parsedUrl.hostname, - path: parsedUrl.path, - method: "PUT", - headers: { "content-type": "", "content-length": responseBody.length } - }; - return new Promise((resolve, reject) => { - try { - const request2 = https.request(requestOptions, resolve); - request2.on("error", reject); - request2.write(responseBody); - request2.end(); - } catch (e) { - reject(e); - } - }); - } -}; -function extractPhysicalResourceId(event) { - switch (event.RequestType) { - case "Create": - return event.LogicalResourceId; - case "Update": - case "Delete": - return event.PhysicalResourceId; - } -} - -// lib/assertions/providers/lambda-handler/assertion.ts -var AssertionHandler = class extends CustomResourceHandler { - async processEvent(request2) { - let actual = decodeCall(request2.actual); - const expected = decodeCall(request2.expected); - let result; - const matcher = new MatchCreator(expected).getMatcher(); - console.log(`Testing equality between ${JSON.stringify(request2.actual)} and ${JSON.stringify(request2.expected)}`); - const matchResult = matcher.test(actual); - matchResult.finished(); - if (matchResult.hasFailed()) { - result = { - data: JSON.stringify({ - status: "fail", - message: [ - ...matchResult.toHumanStrings(), - JSON.stringify(matchResult.target, void 0, 2) - ].join("\n") - }) - }; - if (request2.failDeployment) { - throw new Error(result.data); - } - } else { - result = { - data: JSON.stringify({ - status: "pass" - }) - }; - } - return result; - } -}; -var MatchCreator = class { - constructor(obj) { - this.parsedObj = { - matcher: obj - }; - } - getMatcher() { - try { - const final = JSON.parse(JSON.stringify(this.parsedObj), function(_k, v) { - const nested = Object.keys(v)[0]; - switch (nested) { - case "$ArrayWith": - return Match.arrayWith(v[nested]); - case "$ObjectLike": - return Match.objectLike(v[nested]); - case "$StringLike": - return Match.stringLikeRegexp(v[nested]); - default: - return v; - } - }); - if (Matcher.isMatcher(final.matcher)) { - return final.matcher; - } - return Match.exact(final.matcher); - } catch { - return Match.exact(this.parsedObj.matcher); - } - } -}; -function decodeCall(call) { - if (!call) { - return void 0; - } - try { - const parsed = JSON.parse(call); - return parsed; - } catch (e) { - return call; - } -} - -// lib/assertions/providers/lambda-handler/utils.ts -function decode(object) { - return JSON.parse(JSON.stringify(object), (_k, v) => { - switch (v) { - case "TRUE:BOOLEAN": - return true; - case "FALSE:BOOLEAN": - return false; - default: - return v; - } - }); -} - -// lib/assertions/providers/lambda-handler/sdk.ts -function flatten(object) { - return Object.assign({}, ...function _flatten(child, path = []) { - return [].concat(...Object.keys(child).map((key) => { - const childKey = Buffer.isBuffer(child[key]) ? child[key].toString("utf8") : child[key]; - return typeof childKey === "object" && childKey !== null ? _flatten(childKey, path.concat([key])) : { [path.concat([key]).join(".")]: childKey }; - })); - }(object)); -} -var AwsApiCallHandler = class extends CustomResourceHandler { - async processEvent(request2) { - const AWS = require("aws-sdk"); - console.log(`AWS SDK VERSION: ${AWS.VERSION}`); - const service = new AWS[request2.service](); - const response = await service[request2.api](request2.parameters && decode(request2.parameters)).promise(); - console.log(`SDK response received ${JSON.stringify(response)}`); - delete response.ResponseMetadata; - const respond = { - apiCallResponse: response - }; - const flatData = __spreadValues({}, flatten(respond)); - return request2.flattenResponse === "true" ? flatData : respond; - } -}; - -// lib/assertions/providers/lambda-handler/types.ts -var ASSERT_RESOURCE_TYPE = "Custom::DeployAssert@AssertEquals"; -var SDK_RESOURCE_TYPE_PREFIX = "Custom::DeployAssert@SdkCall"; - -// lib/assertions/providers/lambda-handler/index.ts -async function handler(event, context) { - const provider = createResourceHandler(event, context); - await provider.handle(); -} -function createResourceHandler(event, context) { - if (event.ResourceType.startsWith(SDK_RESOURCE_TYPE_PREFIX)) { - return new AwsApiCallHandler(event, context); - } - switch (event.ResourceType) { - case ASSERT_RESOURCE_TYPE: - return new AssertionHandler(event, context); - default: - throw new Error(`Unsupported resource type "${event.ResourceType}`); - } -} -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - handler -}); diff --git a/packages/@aws-cdk/aws-lambda-destinations/test/destinations.integ.snapshot/asset.0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd.bundle/index.js b/packages/@aws-cdk/aws-events-targets/test/logs/log-group.integ.snapshot/asset.84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7.bundle/index.js old mode 100755 new mode 100644 similarity index 99% rename from packages/@aws-cdk/aws-lambda-destinations/test/destinations.integ.snapshot/asset.0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd.bundle/index.js rename to packages/@aws-cdk/aws-events-targets/test/logs/log-group.integ.snapshot/asset.84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7.bundle/index.js index b3ec1b8c53d30..ba956d47f51fe --- a/packages/@aws-cdk/aws-lambda-destinations/test/destinations.integ.snapshot/asset.0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd.bundle/index.js +++ b/packages/@aws-cdk/aws-events-targets/test/logs/log-group.integ.snapshot/asset.84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7.bundle/index.js @@ -493,7 +493,7 @@ var AssertionHandler = class extends CustomResourceHandler { } else { result = { data: JSON.stringify({ - status: "pass" + status: "success" }) }; } diff --git a/packages/@aws-cdk/aws-events-targets/test/logs/log-group.integ.snapshot/asset.c1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560/index.js b/packages/@aws-cdk/aws-events-targets/test/logs/log-group.integ.snapshot/asset.c1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560/index.js deleted file mode 100755 index c70e48ee0f357..0000000000000 --- a/packages/@aws-cdk/aws-events-targets/test/logs/log-group.integ.snapshot/asset.c1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560/index.js +++ /dev/null @@ -1,252 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.handler = exports.forceSdkInstallation = exports.flatten = exports.PHYSICAL_RESOURCE_ID_REFERENCE = void 0; -/* eslint-disable no-console */ -const child_process_1 = require("child_process"); -const fs = require("fs"); -const path_1 = require("path"); -/** - * Serialized form of the physical resource id for use in the operation parameters - */ -exports.PHYSICAL_RESOURCE_ID_REFERENCE = 'PHYSICAL:RESOURCEID:'; -/** - * Flattens a nested object - * - * @param object the object to be flattened - * @returns a flat object with path as keys - */ -function flatten(object) { - return Object.assign({}, ...function _flatten(child, path = []) { - return [].concat(...Object.keys(child) - .map(key => { - const childKey = Buffer.isBuffer(child[key]) ? child[key].toString('utf8') : child[key]; - return typeof childKey === 'object' && childKey !== null - ? _flatten(childKey, path.concat([key])) - : ({ [path.concat([key]).join('.')]: childKey }); - })); - }(object)); -} -exports.flatten = flatten; -/** - * Decodes encoded special values (physicalResourceId) - */ -function decodeSpecialValues(object, physicalResourceId) { - return JSON.parse(JSON.stringify(object), (_k, v) => { - switch (v) { - case exports.PHYSICAL_RESOURCE_ID_REFERENCE: - return physicalResourceId; - default: - return v; - } - }); -} -/** - * Filters the keys of an object. - */ -function filterKeys(object, pred) { - return Object.entries(object) - .reduce((acc, [k, v]) => pred(k) - ? { ...acc, [k]: v } - : acc, {}); -} -let latestSdkInstalled = false; -function forceSdkInstallation() { - latestSdkInstalled = false; -} -exports.forceSdkInstallation = forceSdkInstallation; -/** - * Installs latest AWS SDK v2 - */ -function installLatestSdk() { - console.log('Installing latest AWS SDK v2'); - // Both HOME and --prefix are needed here because /tmp is the only writable location - child_process_1.execSync('HOME=/tmp npm install aws-sdk@2 --production --no-package-lock --no-save --prefix /tmp'); - latestSdkInstalled = true; -} -// no currently patched services -const patchedServices = []; -/** - * Patches the AWS SDK by loading service models in the same manner as the actual SDK - */ -function patchSdk(awsSdk) { - const apiLoader = awsSdk.apiLoader; - patchedServices.forEach(({ serviceName, apiVersions }) => { - const lowerServiceName = serviceName.toLowerCase(); - if (!awsSdk.Service.hasService(lowerServiceName)) { - apiLoader.services[lowerServiceName] = {}; - awsSdk[serviceName] = awsSdk.Service.defineService(lowerServiceName, apiVersions); - } - else { - awsSdk.Service.addVersions(awsSdk[serviceName], apiVersions); - } - apiVersions.forEach(apiVersion => { - Object.defineProperty(apiLoader.services[lowerServiceName], apiVersion, { - get: function get() { - const modelFilePrefix = `aws-sdk-patch/${lowerServiceName}-${apiVersion}`; - const model = JSON.parse(fs.readFileSync(path_1.join(__dirname, `${modelFilePrefix}.service.json`), 'utf-8')); - model.paginators = JSON.parse(fs.readFileSync(path_1.join(__dirname, `${modelFilePrefix}.paginators.json`), 'utf-8')).pagination; - return model; - }, - enumerable: true, - configurable: true, - }); - }); - }); - return awsSdk; -} -/* eslint-disable @typescript-eslint/no-require-imports, import/no-extraneous-dependencies */ -async function handler(event, context) { - try { - let AWS; - if (!latestSdkInstalled && event.ResourceProperties.InstallLatestAwsSdk === 'true') { - try { - installLatestSdk(); - AWS = require('/tmp/node_modules/aws-sdk'); - } - catch (e) { - console.log(`Failed to install latest AWS SDK v2: ${e}`); - AWS = require('aws-sdk'); // Fallback to pre-installed version - } - } - else if (latestSdkInstalled) { - AWS = require('/tmp/node_modules/aws-sdk'); - } - else { - AWS = require('aws-sdk'); - } - try { - AWS = patchSdk(AWS); - } - catch (e) { - console.log(`Failed to patch AWS SDK: ${e}. Proceeding with the installed copy.`); - } - console.log(JSON.stringify(event)); - console.log('AWS SDK VERSION: ' + AWS.VERSION); - event.ResourceProperties.Create = decodeCall(event.ResourceProperties.Create); - event.ResourceProperties.Update = decodeCall(event.ResourceProperties.Update); - event.ResourceProperties.Delete = decodeCall(event.ResourceProperties.Delete); - // Default physical resource id - let physicalResourceId; - switch (event.RequestType) { - case 'Create': - physicalResourceId = event.ResourceProperties.Create?.physicalResourceId?.id ?? - event.ResourceProperties.Update?.physicalResourceId?.id ?? - event.ResourceProperties.Delete?.physicalResourceId?.id ?? - event.LogicalResourceId; - break; - case 'Update': - case 'Delete': - physicalResourceId = event.ResourceProperties[event.RequestType]?.physicalResourceId?.id ?? event.PhysicalResourceId; - break; - } - let flatData = {}; - let data = {}; - const call = event.ResourceProperties[event.RequestType]; - if (call) { - let credentials; - if (call.assumedRoleArn) { - const timestamp = (new Date()).getTime(); - const params = { - RoleArn: call.assumedRoleArn, - RoleSessionName: `${timestamp}-${physicalResourceId}`.substring(0, 64), - }; - credentials = new AWS.ChainableTemporaryCredentials({ - params: params, - }); - } - if (!Object.prototype.hasOwnProperty.call(AWS, call.service)) { - throw Error(`Service ${call.service} does not exist in AWS SDK version ${AWS.VERSION}.`); - } - const awsService = new AWS[call.service]({ - apiVersion: call.apiVersion, - credentials: credentials, - region: call.region, - }); - try { - const response = await awsService[call.action](call.parameters && decodeSpecialValues(call.parameters, physicalResourceId)).promise(); - flatData = { - apiVersion: awsService.config.apiVersion, - region: awsService.config.region, - ...flatten(response), - }; - let outputPaths; - if (call.outputPath) { - outputPaths = [call.outputPath]; - } - else if (call.outputPaths) { - outputPaths = call.outputPaths; - } - if (outputPaths) { - data = filterKeys(flatData, startsWithOneOf(outputPaths)); - } - else { - data = flatData; - } - } - catch (e) { - if (!call.ignoreErrorCodesMatching || !new RegExp(call.ignoreErrorCodesMatching).test(e.code)) { - throw e; - } - } - if (call.physicalResourceId?.responsePath) { - physicalResourceId = flatData[call.physicalResourceId.responsePath]; - } - } - await respond('SUCCESS', 'OK', physicalResourceId, data); - } - catch (e) { - console.log(e); - await respond('FAILED', e.message || 'Internal Error', context.logStreamName, {}); - } - function respond(responseStatus, reason, physicalResourceId, data) { - const responseBody = JSON.stringify({ - Status: responseStatus, - Reason: reason, - PhysicalResourceId: physicalResourceId, - StackId: event.StackId, - RequestId: event.RequestId, - LogicalResourceId: event.LogicalResourceId, - NoEcho: false, - Data: data, - }); - console.log('Responding', responseBody); - // eslint-disable-next-line @typescript-eslint/no-require-imports - const parsedUrl = require('url').parse(event.ResponseURL); - const requestOptions = { - hostname: parsedUrl.hostname, - path: parsedUrl.path, - method: 'PUT', - headers: { 'content-type': '', 'content-length': responseBody.length }, - }; - return new Promise((resolve, reject) => { - try { - // eslint-disable-next-line @typescript-eslint/no-require-imports - const request = require('https').request(requestOptions, resolve); - request.on('error', reject); - request.write(responseBody); - request.end(); - } - catch (e) { - reject(e); - } - }); - } -} -exports.handler = handler; -function decodeCall(call) { - if (!call) { - return undefined; - } - return JSON.parse(call); -} -function startsWithOneOf(searchStrings) { - return function (string) { - for (const searchString of searchStrings) { - if (string.startsWith(searchString)) { - return true; - } - } - return false; - }; -} -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSwrQkFBK0I7QUFDL0IsaURBQXlDO0FBQ3pDLHlCQUF5QjtBQUN6QiwrQkFBNEI7QUFTNUI7O0dBRUc7QUFDVSxRQUFBLDhCQUE4QixHQUFHLHNCQUFzQixDQUFDO0FBRXJFOzs7OztHQUtHO0FBQ0gsU0FBZ0IsT0FB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IGlmICghY2FsbCkgeyByZXR1cm4gdW5kZWZpbmVkOyB9XG4gIHJldHVybiBKU09OLnBhcnNlKGNhbGwpO1xufVxuXG5mdW5jdGlvbiBzdGFydHNXaXRoT25lT2Yoc2VhcmNoU3RyaW5nczogc3RyaW5nW10pOiAoc3RyaW5nOiBzdHJpbmcpID0+IGJvb2xlYW4ge1xuICByZXR1cm4gZnVuY3Rpb24oc3RyaW5nOiBzdHJpbmcpOiBib29sZWFuIHtcbiAgICBmb3IgKGNvbnN0IHNlYXJjaFN0cmluZyBvZiBzZWFyY2hTdHJpbmdzKSB7XG4gICAgICBpZiAoc3RyaW5nLnN0YXJ0c1dpdGgoc2VhcmNoU3RyaW5nKSkge1xuICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIGZhbHNlO1xuICB9O1xufVxuIl19 \ No newline at end of file diff --git a/packages/@aws-cdk/aws-events-targets/test/logs/log-group.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-events-targets/test/logs/log-group.integ.snapshot/cdk.out index 588d7b269d34f..8ecc185e9dbee 100644 --- a/packages/@aws-cdk/aws-events-targets/test/logs/log-group.integ.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-events-targets/test/logs/log-group.integ.snapshot/cdk.out @@ -1 +1 @@ -{"version":"20.0.0"} \ No newline at end of file +{"version":"21.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-events-targets/test/logs/log-group.integ.snapshot/integ.json b/packages/@aws-cdk/aws-events-targets/test/logs/log-group.integ.snapshot/integ.json index 920644926b3e6..682814dfbc70a 100644 --- a/packages/@aws-cdk/aws-events-targets/test/logs/log-group.integ.snapshot/integ.json +++ b/packages/@aws-cdk/aws-events-targets/test/logs/log-group.integ.snapshot/integ.json @@ -1,11 +1,12 @@ { - "version": "20.0.0", + "version": "21.0.0", "testCases": { "LogGroup/DefaultTest": { "stacks": [ "log-group-events" ], - "assertionStack": "LogGroupDefaultTestDeployAssert353EE07A" + "assertionStack": "LogGroup/DefaultTest/DeployAssert", + "assertionStackName": "LogGroupDefaultTestDeployAssert353EE07A" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-events-targets/test/logs/log-group.integ.snapshot/log-group-events.template.json b/packages/@aws-cdk/aws-events-targets/test/logs/log-group.integ.snapshot/log-group-events.template.json index 87d418fdc2ed4..e984f2b6b1757 100644 --- a/packages/@aws-cdk/aws-events-targets/test/logs/log-group.integ.snapshot/log-group-events.template.json +++ b/packages/@aws-cdk/aws-events-targets/test/logs/log-group.integ.snapshot/log-group-events.template.json @@ -60,30 +60,6 @@ ] } }, - "EventsLogGroupPolicyloggroupeventsTimerC63340B0CustomResourcePolicy67B796AA": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:DeleteResourcePolicy", - "logs:PutResourcePolicy" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EventsLogGroupPolicyloggroupeventsTimerC63340B0CustomResourcePolicy67B796AA", - "Roles": [ - { - "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - } - ] - } - }, "EventsLogGroupPolicyloggroupeventsTimerC63340B0C92153CD": { "Type": "Custom::CloudwatchLogResourcePolicy", "Properties": { @@ -132,6 +108,30 @@ "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" }, + "EventsLogGroupPolicyloggroupeventsTimerC63340B0CustomResourcePolicy67B796AA": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "logs:DeleteResourcePolicy", + "logs:PutResourcePolicy" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EventsLogGroupPolicyloggroupeventsTimerC63340B0CustomResourcePolicy67B796AA", + "Roles": [ + { + "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" + } + ] + } + }, "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2": { "Type": "AWS::IAM::Role", "Properties": { @@ -168,7 +168,7 @@ "Properties": { "Code": { "S3Bucket": { - "Ref": "AssetParametersc1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560S3Bucket648C0EE1" + "Ref": "AssetParameters105b4f39ae68785e705640aa91919e412fcba2dd454aca53412747be8d955286S3BucketC526447A" }, "S3Key": { "Fn::Join": [ @@ -181,7 +181,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParametersc1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560S3VersionKeyDCBB7AC4" + "Ref": "AssetParameters105b4f39ae68785e705640aa91919e412fcba2dd454aca53412747be8d955286S3VersionKey237620B5" } ] } @@ -194,7 +194,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParametersc1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560S3VersionKeyDCBB7AC4" + "Ref": "AssetParameters105b4f39ae68785e705640aa91919e412fcba2dd454aca53412747be8d955286S3VersionKey237620B5" } ] } @@ -267,30 +267,6 @@ ] } }, - "EventsLogGroupPolicyloggroupeventsCustomRule99E1EEF6CustomResourcePolicy361E9A96": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:DeleteResourcePolicy", - "logs:PutResourcePolicy" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EventsLogGroupPolicyloggroupeventsCustomRule99E1EEF6CustomResourcePolicy361E9A96", - "Roles": [ - { - "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - } - ] - } - }, "EventsLogGroupPolicyloggroupeventsCustomRule99E1EEF6C647CDBC": { "Type": "Custom::CloudwatchLogResourcePolicy", "Properties": { @@ -339,6 +315,30 @@ "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" }, + "EventsLogGroupPolicyloggroupeventsCustomRule99E1EEF6CustomResourcePolicy361E9A96": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "logs:DeleteResourcePolicy", + "logs:PutResourcePolicy" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EventsLogGroupPolicyloggroupeventsCustomRule99E1EEF6CustomResourcePolicy361E9A96", + "Roles": [ + { + "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" + } + ] + } + }, "dlq09C78ACC": { "Type": "AWS::SQS::Queue", "UpdateReplacePolicy": "Delete", @@ -388,30 +388,6 @@ ] } }, - "EventsLogGroupPolicyloggroupeventsTimer37DF74C17CustomResourcePolicyAE930E1E": { - "Type": "AWS::IAM::Policy", - "Properties": { - "PolicyDocument": { - "Statement": [ - { - "Action": [ - "logs:DeleteResourcePolicy", - "logs:PutResourcePolicy" - ], - "Effect": "Allow", - "Resource": "*" - } - ], - "Version": "2012-10-17" - }, - "PolicyName": "EventsLogGroupPolicyloggroupeventsTimer37DF74C17CustomResourcePolicyAE930E1E", - "Roles": [ - { - "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" - } - ] - } - }, "EventsLogGroupPolicyloggroupeventsTimer37DF74C174B3D705D": { "Type": "Custom::CloudwatchLogResourcePolicy", "Properties": { @@ -469,20 +445,44 @@ ], "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" + }, + "EventsLogGroupPolicyloggroupeventsTimer37DF74C17CustomResourcePolicyAE930E1E": { + "Type": "AWS::IAM::Policy", + "Properties": { + "PolicyDocument": { + "Statement": [ + { + "Action": [ + "logs:DeleteResourcePolicy", + "logs:PutResourcePolicy" + ], + "Effect": "Allow", + "Resource": "*" + } + ], + "Version": "2012-10-17" + }, + "PolicyName": "EventsLogGroupPolicyloggroupeventsTimer37DF74C17CustomResourcePolicyAE930E1E", + "Roles": [ + { + "Ref": "AWS679f53fac002430cb0da5b7982bd2287ServiceRoleC1EA0FF2" + } + ] + } } }, "Parameters": { - "AssetParametersc1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560S3Bucket648C0EE1": { + "AssetParameters105b4f39ae68785e705640aa91919e412fcba2dd454aca53412747be8d955286S3BucketC526447A": { "Type": "String", - "Description": "S3 bucket for asset \"c1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560\"" + "Description": "S3 bucket for asset \"105b4f39ae68785e705640aa91919e412fcba2dd454aca53412747be8d955286\"" }, - "AssetParametersc1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560S3VersionKeyDCBB7AC4": { + "AssetParameters105b4f39ae68785e705640aa91919e412fcba2dd454aca53412747be8d955286S3VersionKey237620B5": { "Type": "String", - "Description": "S3 key for asset version \"c1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560\"" + "Description": "S3 key for asset version \"105b4f39ae68785e705640aa91919e412fcba2dd454aca53412747be8d955286\"" }, - "AssetParametersc1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560ArtifactHash99A6E846": { + "AssetParameters105b4f39ae68785e705640aa91919e412fcba2dd454aca53412747be8d955286ArtifactHashC17A8FEC": { "Type": "String", - "Description": "Artifact hash for asset \"c1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560\"" + "Description": "Artifact hash for asset \"105b4f39ae68785e705640aa91919e412fcba2dd454aca53412747be8d955286\"" } }, "Outputs": { diff --git a/packages/@aws-cdk/aws-events-targets/test/logs/log-group.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-events-targets/test/logs/log-group.integ.snapshot/manifest.json index 7235d59f64494..f8d548557859c 100644 --- a/packages/@aws-cdk/aws-events-targets/test/logs/log-group.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-events-targets/test/logs/log-group.integ.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "artifacts": { "Tree": { "type": "cdk:tree", @@ -19,32 +19,26 @@ { "type": "aws:cdk:asset", "data": { - "path": "asset.c1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560", - "id": "c1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560", + "path": "asset.105b4f39ae68785e705640aa91919e412fcba2dd454aca53412747be8d955286", + "id": "105b4f39ae68785e705640aa91919e412fcba2dd454aca53412747be8d955286", "packaging": "zip", - "sourceHash": "c1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560", - "s3BucketParameter": "AssetParametersc1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560S3Bucket648C0EE1", - "s3KeyParameter": "AssetParametersc1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560S3VersionKeyDCBB7AC4", - "artifactHashParameter": "AssetParametersc1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560ArtifactHash99A6E846" + "sourceHash": "105b4f39ae68785e705640aa91919e412fcba2dd454aca53412747be8d955286", + "s3BucketParameter": "AssetParameters105b4f39ae68785e705640aa91919e412fcba2dd454aca53412747be8d955286S3BucketC526447A", + "s3KeyParameter": "AssetParameters105b4f39ae68785e705640aa91919e412fcba2dd454aca53412747be8d955286S3VersionKey237620B5", + "artifactHashParameter": "AssetParameters105b4f39ae68785e705640aa91919e412fcba2dd454aca53412747be8d955286ArtifactHashC17A8FEC" } } ], "/log-group-events/log-group/Resource": [ { "type": "aws:cdk:logicalId", - "data": "loggroupB02AAEB1", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_REPLACE" - ] + "data": "loggroupB02AAEB1" } ], "/log-group-events/log-group2/Resource": [ { "type": "aws:cdk:logicalId", - "data": "loggroup2F19C5C9B", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_REPLACE" - ] + "data": "loggroup2F19C5C9B" } ], "/log-group-events/log-group-imported/Resource": [ @@ -59,16 +53,16 @@ "data": "TimerBF6F831F" } ], - "/log-group-events/EventsLogGroupPolicyloggroupeventsTimerC63340B0/CustomResourcePolicy/Resource": [ + "/log-group-events/EventsLogGroupPolicyloggroupeventsTimerC63340B0/Resource/Default": [ { "type": "aws:cdk:logicalId", - "data": "EventsLogGroupPolicyloggroupeventsTimerC63340B0CustomResourcePolicy67B796AA" + "data": "EventsLogGroupPolicyloggroupeventsTimerC63340B0C92153CD" } ], - "/log-group-events/EventsLogGroupPolicyloggroupeventsTimerC63340B0/Resource/Default": [ + "/log-group-events/EventsLogGroupPolicyloggroupeventsTimerC63340B0/CustomResourcePolicy/Resource": [ { "type": "aws:cdk:logicalId", - "data": "EventsLogGroupPolicyloggroupeventsTimerC63340B0C92153CD" + "data": "EventsLogGroupPolicyloggroupeventsTimerC63340B0CustomResourcePolicy67B796AA" } ], "/log-group-events/AWS679f53fac002430cb0da5b7982bd2287/ServiceRole/Resource": [ @@ -83,22 +77,22 @@ "data": "AWS679f53fac002430cb0da5b7982bd22872D164C4C" } ], - "/log-group-events/AssetParameters/c1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560/S3Bucket": [ + "/log-group-events/AssetParameters/105b4f39ae68785e705640aa91919e412fcba2dd454aca53412747be8d955286/S3Bucket": [ { "type": "aws:cdk:logicalId", - "data": "AssetParametersc1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560S3Bucket648C0EE1" + "data": "AssetParameters105b4f39ae68785e705640aa91919e412fcba2dd454aca53412747be8d955286S3BucketC526447A" } ], - "/log-group-events/AssetParameters/c1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560/S3VersionKey": [ + "/log-group-events/AssetParameters/105b4f39ae68785e705640aa91919e412fcba2dd454aca53412747be8d955286/S3VersionKey": [ { "type": "aws:cdk:logicalId", - "data": "AssetParametersc1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560S3VersionKeyDCBB7AC4" + "data": "AssetParameters105b4f39ae68785e705640aa91919e412fcba2dd454aca53412747be8d955286S3VersionKey237620B5" } ], - "/log-group-events/AssetParameters/c1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560/ArtifactHash": [ + "/log-group-events/AssetParameters/105b4f39ae68785e705640aa91919e412fcba2dd454aca53412747be8d955286/ArtifactHash": [ { "type": "aws:cdk:logicalId", - "data": "AssetParametersc1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560ArtifactHash99A6E846" + "data": "AssetParameters105b4f39ae68785e705640aa91919e412fcba2dd454aca53412747be8d955286ArtifactHashC17A8FEC" } ], "/log-group-events/CustomRule/Resource": [ @@ -107,16 +101,16 @@ "data": "CustomRuleB1CBBADE" } ], - "/log-group-events/EventsLogGroupPolicyloggroupeventsCustomRule99E1EEF6/CustomResourcePolicy/Resource": [ + "/log-group-events/EventsLogGroupPolicyloggroupeventsCustomRule99E1EEF6/Resource/Default": [ { "type": "aws:cdk:logicalId", - "data": "EventsLogGroupPolicyloggroupeventsCustomRule99E1EEF6CustomResourcePolicy361E9A96" + "data": "EventsLogGroupPolicyloggroupeventsCustomRule99E1EEF6C647CDBC" } ], - "/log-group-events/EventsLogGroupPolicyloggroupeventsCustomRule99E1EEF6/Resource/Default": [ + "/log-group-events/EventsLogGroupPolicyloggroupeventsCustomRule99E1EEF6/CustomResourcePolicy/Resource": [ { "type": "aws:cdk:logicalId", - "data": "EventsLogGroupPolicyloggroupeventsCustomRule99E1EEF6C647CDBC" + "data": "EventsLogGroupPolicyloggroupeventsCustomRule99E1EEF6CustomResourcePolicy361E9A96" } ], "/log-group-events/dlq/Resource": [ @@ -131,49 +125,22 @@ "data": "Timer30894E3BB" } ], - "/log-group-events/EventsLogGroupPolicyloggroupeventsTimer37DF74C17/CustomResourcePolicy/Resource": [ - { - "type": "aws:cdk:logicalId", - "data": "EventsLogGroupPolicyloggroupeventsTimer37DF74C17CustomResourcePolicyAE930E1E" - } - ], "/log-group-events/EventsLogGroupPolicyloggroupeventsTimer37DF74C17/Resource/Default": [ { "type": "aws:cdk:logicalId", "data": "EventsLogGroupPolicyloggroupeventsTimer37DF74C174B3D705D" } ], - "/log-group-events/Exports/Output{\"Ref\":\"loggroup2F19C5C9B\"}": [ - { - "type": "aws:cdk:logicalId", - "data": "ExportsOutputRefloggroup2F19C5C9B4F4C6918" - } - ], - "Timer2B6F162E9": [ - { - "type": "aws:cdk:logicalId", - "data": "Timer2B6F162E9", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] - } - ], - "EventsLogGroupPolicyloggroupeventsTimer289E3527ECustomResourcePolicy24E754C4": [ + "/log-group-events/EventsLogGroupPolicyloggroupeventsTimer37DF74C17/CustomResourcePolicy/Resource": [ { "type": "aws:cdk:logicalId", - "data": "EventsLogGroupPolicyloggroupeventsTimer289E3527ECustomResourcePolicy24E754C4", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "EventsLogGroupPolicyloggroupeventsTimer37DF74C17CustomResourcePolicyAE930E1E" } ], - "EventsLogGroupPolicyloggroupeventsTimer289E3527E78608648": [ + "/log-group-events/Exports/Output{\"Ref\":\"loggroup2F19C5C9B\"}": [ { "type": "aws:cdk:logicalId", - "data": "EventsLogGroupPolicyloggroupeventsTimer289E3527E78608648", - "trace": [ - "!!DESTRUCTIVE_CHANGES: WILL_DESTROY" - ] + "data": "ExportsOutputRefloggroup2F19C5C9B4F4C6918" } ] }, @@ -194,13 +161,13 @@ { "type": "aws:cdk:asset", "data": { - "path": "asset.41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736.bundle", - "id": "41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736", + "path": "asset.84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7.bundle", + "id": "84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7", "packaging": "zip", - "sourceHash": "41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736", - "s3BucketParameter": "AssetParameters41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736S3BucketA9F12763", - "s3KeyParameter": "AssetParameters41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736S3VersionKey589F30A2", - "artifactHashParameter": "AssetParameters41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736ArtifactHash2CC614EA" + "sourceHash": "84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7", + "s3BucketParameter": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3BucketA2BC9E80", + "s3KeyParameter": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3VersionKeyB8E92EFE", + "artifactHashParameter": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7ArtifactHashB8137036" } } ], @@ -222,22 +189,22 @@ "data": "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F" } ], - "/LogGroup/DefaultTest/DeployAssert/AssetParameters/41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736/S3Bucket": [ + "/LogGroup/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/S3Bucket": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736S3BucketA9F12763" + "data": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3BucketA2BC9E80" } ], - "/LogGroup/DefaultTest/DeployAssert/AssetParameters/41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736/S3VersionKey": [ + "/LogGroup/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/S3VersionKey": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736S3VersionKey589F30A2" + "data": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3VersionKeyB8E92EFE" } ], - "/LogGroup/DefaultTest/DeployAssert/AssetParameters/41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736/ArtifactHash": [ + "/LogGroup/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/ArtifactHash": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736ArtifactHash2CC614EA" + "data": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7ArtifactHashB8137036" } ], "/LogGroup/DefaultTest/DeployAssert/AwsApiCallCloudWatchLogsfilterLogEvents/Default/Default": [ diff --git a/packages/@aws-cdk/aws-events-targets/test/logs/log-group.integ.snapshot/tree.json b/packages/@aws-cdk/aws-events-targets/test/logs/log-group.integ.snapshot/tree.json index 8c3f639bd5fe1..cf9231d53741f 100644 --- a/packages/@aws-cdk/aws-events-targets/test/logs/log-group.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-events-targets/test/logs/log-group.integ.snapshot/tree.json @@ -9,7 +9,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.33" + "version": "10.1.85" } }, "log-group-events": { @@ -93,8 +93,8 @@ "id": "imported-log-group", "path": "log-group-events/imported-log-group", "constructInfo": { - "fqn": "@aws-cdk/core.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "Timer": { @@ -162,6 +162,24 @@ "version": "0.0.0" } }, + "Resource": { + "id": "Resource", + "path": "log-group-events/EventsLogGroupPolicyloggroupeventsTimerC63340B0/Resource", + "children": { + "Default": { + "id": "Default", + "path": "log-group-events/EventsLogGroupPolicyloggroupeventsTimerC63340B0/Resource/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.85" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.85" + } + }, "CustomResourcePolicy": { "id": "CustomResourcePolicy", "path": "log-group-events/EventsLogGroupPolicyloggroupeventsTimerC63340B0/CustomResourcePolicy", @@ -203,24 +221,6 @@ "fqn": "@aws-cdk/aws-iam.Policy", "version": "0.0.0" } - }, - "Resource": { - "id": "Resource", - "path": "log-group-events/EventsLogGroupPolicyloggroupeventsTimerC63340B0/Resource", - "children": { - "Default": { - "id": "Default", - "path": "log-group-events/EventsLogGroupPolicyloggroupeventsTimerC63340B0/Resource/Default", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/core.CustomResource", - "version": "0.0.0" - } } }, "constructInfo": { @@ -289,8 +289,8 @@ "id": "Stage", "path": "log-group-events/AWS679f53fac002430cb0da5b7982bd2287/Code/Stage", "constructInfo": { - "fqn": "@aws-cdk/core.AssetStaging", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "AssetBucket": { @@ -315,7 +315,7 @@ "aws:cdk:cloudformation:props": { "code": { "s3Bucket": { - "Ref": "AssetParametersc1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560S3Bucket648C0EE1" + "Ref": "AssetParameters105b4f39ae68785e705640aa91919e412fcba2dd454aca53412747be8d955286S3BucketC526447A" }, "s3Key": { "Fn::Join": [ @@ -328,7 +328,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParametersc1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560S3VersionKeyDCBB7AC4" + "Ref": "AssetParameters105b4f39ae68785e705640aa91919e412fcba2dd454aca53412747be8d955286S3VersionKey237620B5" } ] } @@ -341,7 +341,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParametersc1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560S3VersionKeyDCBB7AC4" + "Ref": "AssetParameters105b4f39ae68785e705640aa91919e412fcba2dd454aca53412747be8d955286S3VersionKey237620B5" } ] } @@ -377,44 +377,44 @@ "id": "AssetParameters", "path": "log-group-events/AssetParameters", "children": { - "c1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560": { - "id": "c1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560", - "path": "log-group-events/AssetParameters/c1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560", + "105b4f39ae68785e705640aa91919e412fcba2dd454aca53412747be8d955286": { + "id": "105b4f39ae68785e705640aa91919e412fcba2dd454aca53412747be8d955286", + "path": "log-group-events/AssetParameters/105b4f39ae68785e705640aa91919e412fcba2dd454aca53412747be8d955286", "children": { "S3Bucket": { "id": "S3Bucket", - "path": "log-group-events/AssetParameters/c1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560/S3Bucket", + "path": "log-group-events/AssetParameters/105b4f39ae68785e705640aa91919e412fcba2dd454aca53412747be8d955286/S3Bucket", "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "S3VersionKey": { "id": "S3VersionKey", - "path": "log-group-events/AssetParameters/c1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560/S3VersionKey", + "path": "log-group-events/AssetParameters/105b4f39ae68785e705640aa91919e412fcba2dd454aca53412747be8d955286/S3VersionKey", "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "ArtifactHash": { "id": "ArtifactHash", - "path": "log-group-events/AssetParameters/c1bc48e68a705504356d7b5178aa4617261dbfcf12b70eb9b10fe1fb207ff560/ArtifactHash", + "path": "log-group-events/AssetParameters/105b4f39ae68785e705640aa91919e412fcba2dd454aca53412747be8d955286/ArtifactHash", "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.33" + "version": "10.1.85" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.33" + "version": "10.1.85" } }, "CustomRule": { @@ -496,6 +496,24 @@ "version": "0.0.0" } }, + "Resource": { + "id": "Resource", + "path": "log-group-events/EventsLogGroupPolicyloggroupeventsCustomRule99E1EEF6/Resource", + "children": { + "Default": { + "id": "Default", + "path": "log-group-events/EventsLogGroupPolicyloggroupeventsCustomRule99E1EEF6/Resource/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.85" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.85" + } + }, "CustomResourcePolicy": { "id": "CustomResourcePolicy", "path": "log-group-events/EventsLogGroupPolicyloggroupeventsCustomRule99E1EEF6/CustomResourcePolicy", @@ -537,24 +555,6 @@ "fqn": "@aws-cdk/aws-iam.Policy", "version": "0.0.0" } - }, - "Resource": { - "id": "Resource", - "path": "log-group-events/EventsLogGroupPolicyloggroupeventsCustomRule99E1EEF6/Resource", - "children": { - "Default": { - "id": "Default", - "path": "log-group-events/EventsLogGroupPolicyloggroupeventsCustomRule99E1EEF6/Resource/Default", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/core.CustomResource", - "version": "0.0.0" - } } }, "constructInfo": { @@ -658,6 +658,24 @@ "version": "0.0.0" } }, + "Resource": { + "id": "Resource", + "path": "log-group-events/EventsLogGroupPolicyloggroupeventsTimer37DF74C17/Resource", + "children": { + "Default": { + "id": "Default", + "path": "log-group-events/EventsLogGroupPolicyloggroupeventsTimer37DF74C17/Resource/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.85" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.85" + } + }, "CustomResourcePolicy": { "id": "CustomResourcePolicy", "path": "log-group-events/EventsLogGroupPolicyloggroupeventsTimer37DF74C17/CustomResourcePolicy", @@ -699,24 +717,6 @@ "fqn": "@aws-cdk/aws-iam.Policy", "version": "0.0.0" } - }, - "Resource": { - "id": "Resource", - "path": "log-group-events/EventsLogGroupPolicyloggroupeventsTimer37DF74C17/Resource", - "children": { - "Default": { - "id": "Default", - "path": "log-group-events/EventsLogGroupPolicyloggroupeventsTimer37DF74C17/Resource/Default", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/core.CustomResource", - "version": "0.0.0" - } } }, "constructInfo": { @@ -732,20 +732,20 @@ "id": "Output{\"Ref\":\"loggroup2F19C5C9B\"}", "path": "log-group-events/Exports/Output{\"Ref\":\"loggroup2F19C5C9B\"}", "constructInfo": { - "fqn": "@aws-cdk/core.CfnOutput", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.33" + "version": "10.1.85" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.Stack", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "LogGroup": { @@ -761,7 +761,7 @@ "path": "LogGroup/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.33" + "version": "10.1.85" } }, "DeployAssert": { @@ -781,7 +781,7 @@ "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallEventBridgeputEvents/SdkProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.33" + "version": "10.1.85" } } }, @@ -798,14 +798,14 @@ "id": "Default", "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallEventBridgeputEvents/Default/Default", "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.CustomResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, @@ -822,74 +822,74 @@ "id": "Staging", "path": "LogGroup/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Staging", "constructInfo": { - "fqn": "@aws-cdk/core.AssetStaging", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "Role": { "id": "Role", "path": "LogGroup/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Role", "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "Handler": { "id": "Handler", "path": "LogGroup/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Handler", "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.33" + "version": "10.1.85" } }, "AssetParameters": { "id": "AssetParameters", "path": "LogGroup/DefaultTest/DeployAssert/AssetParameters", "children": { - "41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736": { - "id": "41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736", - "path": "LogGroup/DefaultTest/DeployAssert/AssetParameters/41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736", + "84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7": { + "id": "84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7", + "path": "LogGroup/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7", "children": { "S3Bucket": { "id": "S3Bucket", - "path": "LogGroup/DefaultTest/DeployAssert/AssetParameters/41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736/S3Bucket", + "path": "LogGroup/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/S3Bucket", "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "S3VersionKey": { "id": "S3VersionKey", - "path": "LogGroup/DefaultTest/DeployAssert/AssetParameters/41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736/S3VersionKey", + "path": "LogGroup/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/S3VersionKey", "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "ArtifactHash": { "id": "ArtifactHash", - "path": "LogGroup/DefaultTest/DeployAssert/AssetParameters/41fc8f2dc7c01b34dda9916c7f763e7b7909eb629da9ffe879cb786114aae736/ArtifactHash", + "path": "LogGroup/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/ArtifactHash", "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.33" + "version": "10.1.85" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.33" + "version": "10.1.85" } }, "AwsApiCallCloudWatchLogsfilterLogEvents": { @@ -905,7 +905,7 @@ "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallCloudWatchLogsfilterLogEvents/SdkProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.33" + "version": "10.1.85" } } }, @@ -922,14 +922,14 @@ "id": "Default", "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallCloudWatchLogsfilterLogEvents/Default/Default", "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.CustomResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "AssertEqualsCloudWatchLogsfilterLogEvents": { @@ -945,7 +945,7 @@ "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallCloudWatchLogsfilterLogEvents/AssertEqualsCloudWatchLogsfilterLogEvents/AssertionProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.33" + "version": "10.1.85" } } }, @@ -962,22 +962,22 @@ "id": "Default", "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallCloudWatchLogsfilterLogEvents/AssertEqualsCloudWatchLogsfilterLogEvents/Default/Default", "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.CustomResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "AssertionResults": { "id": "AssertionResults", "path": "LogGroup/DefaultTest/DeployAssert/AwsApiCallCloudWatchLogsfilterLogEvents/AssertEqualsCloudWatchLogsfilterLogEvents/AssertionResults", "constructInfo": { - "fqn": "@aws-cdk/core.CfnOutput", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, @@ -994,8 +994,8 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/core.Stack", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, @@ -1012,8 +1012,8 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/core.App", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-destinations/test/destinations.integ.snapshot/DestinationsDefaultTestDeployAssertCC49E667.template.json b/packages/@aws-cdk/aws-lambda-destinations/test/destinations.integ.snapshot/DestinationsDefaultTestDeployAssertCC49E667.template.json index 57bd8ef6a2df0..92aba278f0904 100644 --- a/packages/@aws-cdk/aws-lambda-destinations/test/destinations.integ.snapshot/DestinationsDefaultTestDeployAssertCC49E667.template.json +++ b/packages/@aws-cdk/aws-lambda-destinations/test/destinations.integ.snapshot/DestinationsDefaultTestDeployAssertCC49E667.template.json @@ -19,7 +19,7 @@ "Payload": "{\"status\":\"OK\"}" }, "flattenResponse": "false", - "salt": "1651691787842" + "salt": "1661796815696" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -39,50 +39,6 @@ } } }, - "AwsApiCallSQSreceiveMessage": { - "Type": "Custom::DeployAssert@SdkCallSQSreceiveMessage", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F", - "Arn" - ] - }, - "service": "SQS", - "api": "receiveMessage", - "parameters": { - "QueueUrl": { - "Fn::ImportValue": "aws-cdk-lambda-destinations:ExportsOutputRefQueue4A7E3555425E8BD3" - }, - "WaitTimeSeconds": 20 - }, - "flattenResponse": "true", - "salt": "1651691787842" - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, - "AwsApiCallSQSreceiveMessageAssertEqualsSQSreceiveMessage56120636": { - "Type": "Custom::DeployAssert@AssertEquals", - "Properties": { - "ServiceToken": { - "Fn::GetAtt": [ - "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F", - "Arn" - ] - }, - "actual": { - "Fn::GetAtt": [ - "AwsApiCallSQSreceiveMessage", - "apiCallResponse.Messages.0.Body" - ] - }, - "expected": "{\"$ObjectLike\":{\"requestContext\":{\"condition\":\"Success\"},\"requestPayload\":{\"status\":\"OK\"},\"responseContext\":{\"statusCode\":200},\"responsePayload\":\"success\"}}", - "salt": "1651691787843" - }, - "UpdateReplacePolicy": "Delete", - "DeletionPolicy": "Delete" - }, "SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73": { "Type": "AWS::IAM::Role", "Properties": { @@ -170,7 +126,7 @@ "Runtime": "nodejs14.x", "Code": { "S3Bucket": { - "Ref": "AssetParameters1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38bS3BucketF7210344" + "Ref": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3BucketA2BC9E80" }, "S3Key": { "Fn::Join": [ @@ -183,7 +139,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38bS3VersionKey1E71961C" + "Ref": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3VersionKeyB8E92EFE" } ] } @@ -196,7 +152,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38bS3VersionKey1E71961C" + "Ref": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3VersionKeyB8E92EFE" } ] } @@ -215,6 +171,64 @@ ] } } + }, + "AwsApiCallSQSreceiveMessage": { + "Type": "Custom::DeployAssert@SdkCallSQSreceiveMessage", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F", + "Arn" + ] + }, + "service": "SQS", + "api": "receiveMessage", + "parameters": { + "QueueUrl": { + "Fn::ImportValue": "aws-cdk-lambda-destinations:ExportsOutputRefQueue4A7E3555425E8BD3" + }, + "WaitTimeSeconds": 20 + }, + "flattenResponse": "true", + "salt": "1661796815696" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, + "AwsApiCallSQSreceiveMessageAssertEqualsSQSreceiveMessage56120636": { + "Type": "Custom::DeployAssert@AssertEquals", + "Properties": { + "ServiceToken": { + "Fn::GetAtt": [ + "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F", + "Arn" + ] + }, + "actual": { + "Fn::GetAtt": [ + "AwsApiCallSQSreceiveMessage", + "apiCallResponse.Messages.0.Body" + ] + }, + "expected": "{\"$ObjectLike\":{\"requestContext\":{\"condition\":\"Success\"},\"requestPayload\":{\"status\":\"OK\"},\"responseContext\":{\"statusCode\":200},\"responsePayload\":\"success\"}}", + "salt": "1661796815696" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + } + }, + "Parameters": { + "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3BucketA2BC9E80": { + "Type": "String", + "Description": "S3 bucket for asset \"84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7\"" + }, + "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3VersionKeyB8E92EFE": { + "Type": "String", + "Description": "S3 key for asset version \"84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7\"" + }, + "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7ArtifactHashB8137036": { + "Type": "String", + "Description": "Artifact hash for asset \"84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7\"" } }, "Outputs": { @@ -226,19 +240,5 @@ ] } } - }, - "Parameters": { - "AssetParameters1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38bS3BucketF7210344": { - "Type": "String", - "Description": "S3 bucket for asset \"1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38b\"" - }, - "AssetParameters1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38bS3VersionKey1E71961C": { - "Type": "String", - "Description": "S3 key for asset version \"1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38b\"" - }, - "AssetParameters1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38bArtifactHash4F8362F2": { - "Type": "String", - "Description": "Artifact hash for asset \"1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38b\"" - } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-destinations/test/destinations.integ.snapshot/asset.1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38b.bundle/index.js b/packages/@aws-cdk/aws-lambda-destinations/test/destinations.integ.snapshot/asset.1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38b.bundle/index.js deleted file mode 100644 index 32e3e2c1e5a95..0000000000000 --- a/packages/@aws-cdk/aws-lambda-destinations/test/destinations.integ.snapshot/asset.1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38b.bundle/index.js +++ /dev/null @@ -1,644 +0,0 @@ -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getOwnPropSymbols = Object.getOwnPropertySymbols; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __propIsEnum = Object.prototype.propertyIsEnumerable; -var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; -var __spreadValues = (a, b) => { - for (var prop in b || (b = {})) - if (__hasOwnProp.call(b, prop)) - __defNormalProp(a, prop, b[prop]); - if (__getOwnPropSymbols) - for (var prop of __getOwnPropSymbols(b)) { - if (__propIsEnum.call(b, prop)) - __defNormalProp(a, prop, b[prop]); - } - return a; -}; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// lib/assertions/providers/lambda-handler/index.ts -var lambda_handler_exports = {}; -__export(lambda_handler_exports, { - handler: () => handler -}); -module.exports = __toCommonJS(lambda_handler_exports); - -// ../assertions/lib/matcher.ts -var Matcher = class { - static isMatcher(x) { - return x && x instanceof Matcher; - } -}; -var MatchResult = class { - constructor(target) { - this.failures = []; - this.captures = /* @__PURE__ */ new Map(); - this.finalized = false; - this.target = target; - } - push(matcher, path, message) { - return this.recordFailure({ matcher, path, message }); - } - recordFailure(failure) { - this.failures.push(failure); - return this; - } - hasFailed() { - return this.failures.length !== 0; - } - get failCount() { - return this.failures.length; - } - compose(id, inner) { - const innerF = inner.failures; - this.failures.push(...innerF.map((f) => { - return { path: [id, ...f.path], message: f.message, matcher: f.matcher }; - })); - inner.captures.forEach((vals, capture) => { - vals.forEach((value) => this.recordCapture({ capture, value })); - }); - return this; - } - finished() { - if (this.finalized) { - return this; - } - if (this.failCount === 0) { - this.captures.forEach((vals, cap) => cap._captured.push(...vals)); - } - this.finalized = true; - return this; - } - toHumanStrings() { - return this.failures.map((r) => { - const loc = r.path.length === 0 ? "" : ` at ${r.path.join("")}`; - return "" + r.message + loc + ` (using ${r.matcher.name} matcher)`; - }); - } - recordCapture(options) { - let values = this.captures.get(options.capture); - if (values === void 0) { - values = []; - } - values.push(options.value); - this.captures.set(options.capture, values); - } -}; - -// ../assertions/lib/private/matchers/absent.ts -var AbsentMatch = class extends Matcher { - constructor(name) { - super(); - this.name = name; - } - test(actual) { - const result = new MatchResult(actual); - if (actual !== void 0) { - result.recordFailure({ - matcher: this, - path: [], - message: `Received ${actual}, but key should be absent` - }); - } - return result; - } -}; - -// ../assertions/lib/private/type.ts -function getType(obj) { - return Array.isArray(obj) ? "array" : typeof obj; -} - -// ../assertions/lib/match.ts -var Match = class { - static absent() { - return new AbsentMatch("absent"); - } - static arrayWith(pattern) { - return new ArrayMatch("arrayWith", pattern); - } - static arrayEquals(pattern) { - return new ArrayMatch("arrayEquals", pattern, { subsequence: false }); - } - static exact(pattern) { - return new LiteralMatch("exact", pattern, { partialObjects: false }); - } - static objectLike(pattern) { - return new ObjectMatch("objectLike", pattern); - } - static objectEquals(pattern) { - return new ObjectMatch("objectEquals", pattern, { partial: false }); - } - static not(pattern) { - return new NotMatch("not", pattern); - } - static serializedJson(pattern) { - return new SerializedJson("serializedJson", pattern); - } - static anyValue() { - return new AnyMatch("anyValue"); - } - static stringLikeRegexp(pattern) { - return new StringLikeRegexpMatch("stringLikeRegexp", pattern); - } -}; -var LiteralMatch = class extends Matcher { - constructor(name, pattern, options = {}) { - super(); - this.name = name; - this.pattern = pattern; - this.partialObjects = options.partialObjects ?? false; - if (Matcher.isMatcher(this.pattern)) { - throw new Error("LiteralMatch cannot directly contain another matcher. Remove the top-level matcher or nest it more deeply."); - } - } - test(actual) { - if (Array.isArray(this.pattern)) { - return new ArrayMatch(this.name, this.pattern, { subsequence: false, partialObjects: this.partialObjects }).test(actual); - } - if (typeof this.pattern === "object") { - return new ObjectMatch(this.name, this.pattern, { partial: this.partialObjects }).test(actual); - } - const result = new MatchResult(actual); - if (typeof this.pattern !== typeof actual) { - result.recordFailure({ - matcher: this, - path: [], - message: `Expected type ${typeof this.pattern} but received ${getType(actual)}` - }); - return result; - } - if (actual !== this.pattern) { - result.recordFailure({ - matcher: this, - path: [], - message: `Expected ${this.pattern} but received ${actual}` - }); - } - return result; - } -}; -var ArrayMatch = class extends Matcher { - constructor(name, pattern, options = {}) { - super(); - this.name = name; - this.pattern = pattern; - this.subsequence = options.subsequence ?? true; - this.partialObjects = options.partialObjects ?? false; - } - test(actual) { - if (!Array.isArray(actual)) { - return new MatchResult(actual).recordFailure({ - matcher: this, - path: [], - message: `Expected type array but received ${getType(actual)}` - }); - } - if (!this.subsequence && this.pattern.length !== actual.length) { - return new MatchResult(actual).recordFailure({ - matcher: this, - path: [], - message: `Expected array of length ${this.pattern.length} but received ${actual.length}` - }); - } - let patternIdx = 0; - let actualIdx = 0; - const result = new MatchResult(actual); - while (patternIdx < this.pattern.length && actualIdx < actual.length) { - const patternElement = this.pattern[patternIdx]; - const matcher = Matcher.isMatcher(patternElement) ? patternElement : new LiteralMatch(this.name, patternElement, { partialObjects: this.partialObjects }); - const matcherName = matcher.name; - if (this.subsequence && (matcherName == "absent" || matcherName == "anyValue")) { - throw new Error(`The Matcher ${matcherName}() cannot be nested within arrayWith()`); - } - const innerResult = matcher.test(actual[actualIdx]); - if (!this.subsequence || !innerResult.hasFailed()) { - result.compose(`[${actualIdx}]`, innerResult); - patternIdx++; - actualIdx++; - } else { - actualIdx++; - } - } - for (; patternIdx < this.pattern.length; patternIdx++) { - const pattern = this.pattern[patternIdx]; - const element = Matcher.isMatcher(pattern) || typeof pattern === "object" ? " " : ` [${pattern}] `; - result.recordFailure({ - matcher: this, - path: [], - message: `Missing element${element}at pattern index ${patternIdx}` - }); - } - return result; - } -}; -var ObjectMatch = class extends Matcher { - constructor(name, pattern, options = {}) { - super(); - this.name = name; - this.pattern = pattern; - this.partial = options.partial ?? true; - } - test(actual) { - if (typeof actual !== "object" || Array.isArray(actual)) { - return new MatchResult(actual).recordFailure({ - matcher: this, - path: [], - message: `Expected type object but received ${getType(actual)}` - }); - } - const result = new MatchResult(actual); - if (!this.partial) { - for (const a of Object.keys(actual)) { - if (!(a in this.pattern)) { - result.recordFailure({ - matcher: this, - path: [`/${a}`], - message: "Unexpected key" - }); - } - } - } - for (const [patternKey, patternVal] of Object.entries(this.pattern)) { - if (!(patternKey in actual) && !(patternVal instanceof AbsentMatch)) { - result.recordFailure({ - matcher: this, - path: [`/${patternKey}`], - message: `Missing key '${patternKey}' among {${Object.keys(actual).join(",")}}` - }); - continue; - } - const matcher = Matcher.isMatcher(patternVal) ? patternVal : new LiteralMatch(this.name, patternVal, { partialObjects: this.partial }); - const inner = matcher.test(actual[patternKey]); - result.compose(`/${patternKey}`, inner); - } - return result; - } -}; -var SerializedJson = class extends Matcher { - constructor(name, pattern) { - super(); - this.name = name; - this.pattern = pattern; - } - test(actual) { - const result = new MatchResult(actual); - if (getType(actual) !== "string") { - result.recordFailure({ - matcher: this, - path: [], - message: `Expected JSON as a string but found ${getType(actual)}` - }); - return result; - } - let parsed; - try { - parsed = JSON.parse(actual); - } catch (err) { - if (err instanceof SyntaxError) { - result.recordFailure({ - matcher: this, - path: [], - message: `Invalid JSON string: ${actual}` - }); - return result; - } else { - throw err; - } - } - const matcher = Matcher.isMatcher(this.pattern) ? this.pattern : new LiteralMatch(this.name, this.pattern); - const innerResult = matcher.test(parsed); - result.compose(`(${this.name})`, innerResult); - return result; - } -}; -var NotMatch = class extends Matcher { - constructor(name, pattern) { - super(); - this.name = name; - this.pattern = pattern; - } - test(actual) { - const matcher = Matcher.isMatcher(this.pattern) ? this.pattern : new LiteralMatch(this.name, this.pattern); - const innerResult = matcher.test(actual); - const result = new MatchResult(actual); - if (innerResult.failCount === 0) { - result.recordFailure({ - matcher: this, - path: [], - message: `Found unexpected match: ${JSON.stringify(actual, void 0, 2)}` - }); - } - return result; - } -}; -var AnyMatch = class extends Matcher { - constructor(name) { - super(); - this.name = name; - } - test(actual) { - const result = new MatchResult(actual); - if (actual == null) { - result.recordFailure({ - matcher: this, - path: [], - message: "Expected a value but found none" - }); - } - return result; - } -}; -var StringLikeRegexpMatch = class extends Matcher { - constructor(name, pattern) { - super(); - this.name = name; - this.pattern = pattern; - } - test(actual) { - const result = new MatchResult(actual); - const regex = new RegExp(this.pattern, "gm"); - if (typeof actual !== "string") { - result.recordFailure({ - matcher: this, - path: [], - message: `Expected a string, but got '${typeof actual}'` - }); - } - if (!regex.test(actual)) { - result.recordFailure({ - matcher: this, - path: [], - message: `String '${actual}' did not match pattern '${this.pattern}'` - }); - } - return result; - } -}; - -// lib/assertions/providers/lambda-handler/base.ts -var https = __toESM(require("https")); -var url = __toESM(require("url")); -var CustomResourceHandler = class { - constructor(event, context) { - this.event = event; - this.context = context; - this.timedOut = false; - this.timeout = setTimeout(async () => { - await this.respond({ - status: "FAILED", - reason: "Lambda Function Timeout", - data: this.context.logStreamName - }); - this.timedOut = true; - }, context.getRemainingTimeInMillis() - 1200); - this.event = event; - this.physicalResourceId = extractPhysicalResourceId(event); - } - async handle() { - try { - console.log(`Event: ${JSON.stringify(this.event)}`); - const response = await this.processEvent(this.event.ResourceProperties); - console.log(`Event output : ${JSON.stringify(response)}`); - await this.respond({ - status: "SUCCESS", - reason: "OK", - data: response - }); - } catch (e) { - console.log(e); - await this.respond({ - status: "FAILED", - reason: e.message ?? "Internal Error" - }); - } finally { - clearTimeout(this.timeout); - } - } - respond(response) { - if (this.timedOut) { - return; - } - const cfResponse = { - Status: response.status, - Reason: response.reason, - PhysicalResourceId: this.physicalResourceId, - StackId: this.event.StackId, - RequestId: this.event.RequestId, - LogicalResourceId: this.event.LogicalResourceId, - NoEcho: false, - Data: response.data - }; - const responseBody = JSON.stringify(cfResponse); - console.log("Responding to CloudFormation", responseBody); - const parsedUrl = url.parse(this.event.ResponseURL); - const requestOptions = { - hostname: parsedUrl.hostname, - path: parsedUrl.path, - method: "PUT", - headers: { "content-type": "", "content-length": responseBody.length } - }; - return new Promise((resolve, reject) => { - try { - const request2 = https.request(requestOptions, resolve); - request2.on("error", reject); - request2.write(responseBody); - request2.end(); - } catch (e) { - reject(e); - } - }); - } -}; -function extractPhysicalResourceId(event) { - switch (event.RequestType) { - case "Create": - return event.LogicalResourceId; - case "Update": - case "Delete": - return event.PhysicalResourceId; - } -} - -// lib/assertions/providers/lambda-handler/assertion.ts -var AssertionHandler = class extends CustomResourceHandler { - async processEvent(request2) { - let actual = decodeCall(request2.actual); - const expected = decodeCall(request2.expected); - let result; - const matcher = new MatchCreator(expected).getMatcher(); - console.log(`Testing equality between ${JSON.stringify(request2.actual)} and ${JSON.stringify(request2.expected)}`); - const matchResult = matcher.test(actual); - matchResult.finished(); - if (matchResult.hasFailed()) { - result = { - data: JSON.stringify({ - status: "fail", - message: [ - ...matchResult.toHumanStrings(), - JSON.stringify(matchResult.target, void 0, 2) - ].join("\n") - }) - }; - } else { - result = { - data: JSON.stringify({ - status: "pass" - }) - }; - } - return result; - } -}; -var MatchCreator = class { - constructor(obj) { - switch (Object.keys(obj)[0]) { - case "$ObjectLike": - this.type = "objectLike"; - this.parsedObj = obj.$ObjectLike; - break; - case "$ArrayWith": - this.type = "arrayWith"; - this.parsedObj = obj.$ArrayWith; - break; - case "$Exact": - this.type = "exact"; - this.parsedObj = obj.$Exact; - break; - case "$StringLike": - this.type = "stringLikeRegexp"; - this.parsedObj = obj.$StringLike; - break; - default: - this.type = "exact"; - this.parsedObj = obj; - } - } - getMatcher() { - try { - const final = JSON.parse(JSON.stringify(this.parsedObj), function(_k, v) { - const nested = Object.keys(v)[0]; - switch (nested) { - case "$ArrayWith": - return Match.arrayWith(v[nested]); - case "$ObjectLike": - return Match.objectLike(v[nested]); - case "$StringLike": - return Match.stringLikeRegexp(v[nested]); - default: - return v; - } - }); - return Match[this.type](final); - } catch { - return Match[this.type](this.parsedObj); - } - } -}; -function decodeCall(call) { - if (!call) { - return void 0; - } - try { - const parsed = JSON.parse(call); - return parsed; - } catch (e) { - return call; - } -} - -// lib/assertions/providers/lambda-handler/results.ts -var ResultsCollectionHandler = class extends CustomResourceHandler { - async processEvent(request2) { - const reduced = request2.assertionResults.reduce((agg, result, idx) => { - const msg = result.status === "pass" ? "pass" : `fail - ${result.message}`; - return `${agg} -Test${idx}: ${msg}`; - }, "").trim(); - return { message: reduced }; - } -}; - -// lib/assertions/providers/lambda-handler/utils.ts -function decode(object) { - return JSON.parse(JSON.stringify(object), (_k, v) => { - switch (v) { - case "TRUE:BOOLEAN": - return true; - case "FALSE:BOOLEAN": - return false; - default: - return v; - } - }); -} - -// lib/assertions/providers/lambda-handler/sdk.ts -function flatten(object) { - return Object.assign({}, ...function _flatten(child, path = []) { - return [].concat(...Object.keys(child).map((key) => { - const childKey = Buffer.isBuffer(child[key]) ? child[key].toString("utf8") : child[key]; - return typeof childKey === "object" && childKey !== null ? _flatten(childKey, path.concat([key])) : { [path.concat([key]).join(".")]: childKey }; - })); - }(object)); -} -var AwsApiCallHandler = class extends CustomResourceHandler { - async processEvent(request2) { - const AWS = require("aws-sdk"); - console.log(`AWS SDK VERSION: ${AWS.VERSION}`); - const service = new AWS[request2.service](); - const response = await service[request2.api](request2.parameters && decode(request2.parameters)).promise(); - console.log(`SDK response received ${JSON.stringify(response)}`); - delete response.ResponseMetadata; - const respond = { - apiCallResponse: response - }; - const flatData = __spreadValues({}, flatten(respond)); - return request2.flattenResponse === "true" ? flatData : respond; - } -}; - -// lib/assertions/providers/lambda-handler/types.ts -var ASSERT_RESOURCE_TYPE = "Custom::DeployAssert@AssertEquals"; -var RESULTS_RESOURCE_TYPE = "Custom::DeployAssert@ResultsCollection"; -var SDK_RESOURCE_TYPE_PREFIX = "Custom::DeployAssert@SdkCall"; - -// lib/assertions/providers/lambda-handler/index.ts -async function handler(event, context) { - const provider = createResourceHandler(event, context); - await provider.handle(); -} -function createResourceHandler(event, context) { - if (event.ResourceType.startsWith(SDK_RESOURCE_TYPE_PREFIX)) { - return new AwsApiCallHandler(event, context); - } - switch (event.ResourceType) { - case ASSERT_RESOURCE_TYPE: - return new AssertionHandler(event, context); - case RESULTS_RESOURCE_TYPE: - return new ResultsCollectionHandler(event, context); - default: - throw new Error(`Unsupported resource type "${event.ResourceType}`); - } -} -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - handler -}); diff --git a/packages/@aws-cdk/aws-lambda-destinations/test/destinations.integ.snapshot/asset.84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7.bundle/index.js b/packages/@aws-cdk/aws-lambda-destinations/test/destinations.integ.snapshot/asset.84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7.bundle/index.js new file mode 100644 index 0000000000000..ba956d47f51fe --- /dev/null +++ b/packages/@aws-cdk/aws-lambda-destinations/test/destinations.integ.snapshot/asset.84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7.bundle/index.js @@ -0,0 +1,612 @@ +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// lib/assertions/providers/lambda-handler/index.ts +var lambda_handler_exports = {}; +__export(lambda_handler_exports, { + handler: () => handler +}); +module.exports = __toCommonJS(lambda_handler_exports); + +// ../assertions/lib/matcher.ts +var Matcher = class { + static isMatcher(x) { + return x && x instanceof Matcher; + } +}; +var MatchResult = class { + constructor(target) { + this.failures = []; + this.captures = /* @__PURE__ */ new Map(); + this.finalized = false; + this.target = target; + } + push(matcher, path, message) { + return this.recordFailure({ matcher, path, message }); + } + recordFailure(failure) { + this.failures.push(failure); + return this; + } + hasFailed() { + return this.failures.length !== 0; + } + get failCount() { + return this.failures.length; + } + compose(id, inner) { + const innerF = inner.failures; + this.failures.push(...innerF.map((f) => { + return { path: [id, ...f.path], message: f.message, matcher: f.matcher }; + })); + inner.captures.forEach((vals, capture) => { + vals.forEach((value) => this.recordCapture({ capture, value })); + }); + return this; + } + finished() { + if (this.finalized) { + return this; + } + if (this.failCount === 0) { + this.captures.forEach((vals, cap) => cap._captured.push(...vals)); + } + this.finalized = true; + return this; + } + toHumanStrings() { + return this.failures.map((r) => { + const loc = r.path.length === 0 ? "" : ` at ${r.path.join("")}`; + return "" + r.message + loc + ` (using ${r.matcher.name} matcher)`; + }); + } + recordCapture(options) { + let values = this.captures.get(options.capture); + if (values === void 0) { + values = []; + } + values.push(options.value); + this.captures.set(options.capture, values); + } +}; + +// ../assertions/lib/private/matchers/absent.ts +var AbsentMatch = class extends Matcher { + constructor(name) { + super(); + this.name = name; + } + test(actual) { + const result = new MatchResult(actual); + if (actual !== void 0) { + result.recordFailure({ + matcher: this, + path: [], + message: `Received ${actual}, but key should be absent` + }); + } + return result; + } +}; + +// ../assertions/lib/private/type.ts +function getType(obj) { + return Array.isArray(obj) ? "array" : typeof obj; +} + +// ../assertions/lib/match.ts +var Match = class { + static absent() { + return new AbsentMatch("absent"); + } + static arrayWith(pattern) { + return new ArrayMatch("arrayWith", pattern); + } + static arrayEquals(pattern) { + return new ArrayMatch("arrayEquals", pattern, { subsequence: false }); + } + static exact(pattern) { + return new LiteralMatch("exact", pattern, { partialObjects: false }); + } + static objectLike(pattern) { + return new ObjectMatch("objectLike", pattern); + } + static objectEquals(pattern) { + return new ObjectMatch("objectEquals", pattern, { partial: false }); + } + static not(pattern) { + return new NotMatch("not", pattern); + } + static serializedJson(pattern) { + return new SerializedJson("serializedJson", pattern); + } + static anyValue() { + return new AnyMatch("anyValue"); + } + static stringLikeRegexp(pattern) { + return new StringLikeRegexpMatch("stringLikeRegexp", pattern); + } +}; +var LiteralMatch = class extends Matcher { + constructor(name, pattern, options = {}) { + super(); + this.name = name; + this.pattern = pattern; + this.partialObjects = options.partialObjects ?? false; + if (Matcher.isMatcher(this.pattern)) { + throw new Error("LiteralMatch cannot directly contain another matcher. Remove the top-level matcher or nest it more deeply."); + } + } + test(actual) { + if (Array.isArray(this.pattern)) { + return new ArrayMatch(this.name, this.pattern, { subsequence: false, partialObjects: this.partialObjects }).test(actual); + } + if (typeof this.pattern === "object") { + return new ObjectMatch(this.name, this.pattern, { partial: this.partialObjects }).test(actual); + } + const result = new MatchResult(actual); + if (typeof this.pattern !== typeof actual) { + result.recordFailure({ + matcher: this, + path: [], + message: `Expected type ${typeof this.pattern} but received ${getType(actual)}` + }); + return result; + } + if (actual !== this.pattern) { + result.recordFailure({ + matcher: this, + path: [], + message: `Expected ${this.pattern} but received ${actual}` + }); + } + return result; + } +}; +var ArrayMatch = class extends Matcher { + constructor(name, pattern, options = {}) { + super(); + this.name = name; + this.pattern = pattern; + this.subsequence = options.subsequence ?? true; + this.partialObjects = options.partialObjects ?? false; + } + test(actual) { + if (!Array.isArray(actual)) { + return new MatchResult(actual).recordFailure({ + matcher: this, + path: [], + message: `Expected type array but received ${getType(actual)}` + }); + } + if (!this.subsequence && this.pattern.length !== actual.length) { + return new MatchResult(actual).recordFailure({ + matcher: this, + path: [], + message: `Expected array of length ${this.pattern.length} but received ${actual.length}` + }); + } + let patternIdx = 0; + let actualIdx = 0; + const result = new MatchResult(actual); + while (patternIdx < this.pattern.length && actualIdx < actual.length) { + const patternElement = this.pattern[patternIdx]; + const matcher = Matcher.isMatcher(patternElement) ? patternElement : new LiteralMatch(this.name, patternElement, { partialObjects: this.partialObjects }); + const matcherName = matcher.name; + if (this.subsequence && (matcherName == "absent" || matcherName == "anyValue")) { + throw new Error(`The Matcher ${matcherName}() cannot be nested within arrayWith()`); + } + const innerResult = matcher.test(actual[actualIdx]); + if (!this.subsequence || !innerResult.hasFailed()) { + result.compose(`[${actualIdx}]`, innerResult); + patternIdx++; + actualIdx++; + } else { + actualIdx++; + } + } + for (; patternIdx < this.pattern.length; patternIdx++) { + const pattern = this.pattern[patternIdx]; + const element = Matcher.isMatcher(pattern) || typeof pattern === "object" ? " " : ` [${pattern}] `; + result.recordFailure({ + matcher: this, + path: [], + message: `Missing element${element}at pattern index ${patternIdx}` + }); + } + return result; + } +}; +var ObjectMatch = class extends Matcher { + constructor(name, pattern, options = {}) { + super(); + this.name = name; + this.pattern = pattern; + this.partial = options.partial ?? true; + } + test(actual) { + if (typeof actual !== "object" || Array.isArray(actual)) { + return new MatchResult(actual).recordFailure({ + matcher: this, + path: [], + message: `Expected type object but received ${getType(actual)}` + }); + } + const result = new MatchResult(actual); + if (!this.partial) { + for (const a of Object.keys(actual)) { + if (!(a in this.pattern)) { + result.recordFailure({ + matcher: this, + path: [`/${a}`], + message: "Unexpected key" + }); + } + } + } + for (const [patternKey, patternVal] of Object.entries(this.pattern)) { + if (!(patternKey in actual) && !(patternVal instanceof AbsentMatch)) { + result.recordFailure({ + matcher: this, + path: [`/${patternKey}`], + message: `Missing key '${patternKey}' among {${Object.keys(actual).join(",")}}` + }); + continue; + } + const matcher = Matcher.isMatcher(patternVal) ? patternVal : new LiteralMatch(this.name, patternVal, { partialObjects: this.partial }); + const inner = matcher.test(actual[patternKey]); + result.compose(`/${patternKey}`, inner); + } + return result; + } +}; +var SerializedJson = class extends Matcher { + constructor(name, pattern) { + super(); + this.name = name; + this.pattern = pattern; + } + test(actual) { + const result = new MatchResult(actual); + if (getType(actual) !== "string") { + result.recordFailure({ + matcher: this, + path: [], + message: `Expected JSON as a string but found ${getType(actual)}` + }); + return result; + } + let parsed; + try { + parsed = JSON.parse(actual); + } catch (err) { + if (err instanceof SyntaxError) { + result.recordFailure({ + matcher: this, + path: [], + message: `Invalid JSON string: ${actual}` + }); + return result; + } else { + throw err; + } + } + const matcher = Matcher.isMatcher(this.pattern) ? this.pattern : new LiteralMatch(this.name, this.pattern); + const innerResult = matcher.test(parsed); + result.compose(`(${this.name})`, innerResult); + return result; + } +}; +var NotMatch = class extends Matcher { + constructor(name, pattern) { + super(); + this.name = name; + this.pattern = pattern; + } + test(actual) { + const matcher = Matcher.isMatcher(this.pattern) ? this.pattern : new LiteralMatch(this.name, this.pattern); + const innerResult = matcher.test(actual); + const result = new MatchResult(actual); + if (innerResult.failCount === 0) { + result.recordFailure({ + matcher: this, + path: [], + message: `Found unexpected match: ${JSON.stringify(actual, void 0, 2)}` + }); + } + return result; + } +}; +var AnyMatch = class extends Matcher { + constructor(name) { + super(); + this.name = name; + } + test(actual) { + const result = new MatchResult(actual); + if (actual == null) { + result.recordFailure({ + matcher: this, + path: [], + message: "Expected a value but found none" + }); + } + return result; + } +}; +var StringLikeRegexpMatch = class extends Matcher { + constructor(name, pattern) { + super(); + this.name = name; + this.pattern = pattern; + } + test(actual) { + const result = new MatchResult(actual); + const regex = new RegExp(this.pattern, "gm"); + if (typeof actual !== "string") { + result.recordFailure({ + matcher: this, + path: [], + message: `Expected a string, but got '${typeof actual}'` + }); + } + if (!regex.test(actual)) { + result.recordFailure({ + matcher: this, + path: [], + message: `String '${actual}' did not match pattern '${this.pattern}'` + }); + } + return result; + } +}; + +// lib/assertions/providers/lambda-handler/base.ts +var https = __toESM(require("https")); +var url = __toESM(require("url")); +var CustomResourceHandler = class { + constructor(event, context) { + this.event = event; + this.context = context; + this.timedOut = false; + this.timeout = setTimeout(async () => { + await this.respond({ + status: "FAILED", + reason: "Lambda Function Timeout", + data: this.context.logStreamName + }); + this.timedOut = true; + }, context.getRemainingTimeInMillis() - 1200); + this.event = event; + this.physicalResourceId = extractPhysicalResourceId(event); + } + async handle() { + try { + console.log(`Event: ${JSON.stringify({ ...this.event, ResponseURL: "..." })}`); + const response = await this.processEvent(this.event.ResourceProperties); + console.log(`Event output : ${JSON.stringify(response)}`); + await this.respond({ + status: "SUCCESS", + reason: "OK", + data: response + }); + } catch (e) { + console.log(e); + await this.respond({ + status: "FAILED", + reason: e.message ?? "Internal Error" + }); + } finally { + clearTimeout(this.timeout); + } + } + respond(response) { + if (this.timedOut) { + return; + } + const cfResponse = { + Status: response.status, + Reason: response.reason, + PhysicalResourceId: this.physicalResourceId, + StackId: this.event.StackId, + RequestId: this.event.RequestId, + LogicalResourceId: this.event.LogicalResourceId, + NoEcho: false, + Data: response.data + }; + const responseBody = JSON.stringify(cfResponse); + console.log("Responding to CloudFormation", responseBody); + const parsedUrl = url.parse(this.event.ResponseURL); + const requestOptions = { + hostname: parsedUrl.hostname, + path: parsedUrl.path, + method: "PUT", + headers: { "content-type": "", "content-length": responseBody.length } + }; + return new Promise((resolve, reject) => { + try { + const request2 = https.request(requestOptions, resolve); + request2.on("error", reject); + request2.write(responseBody); + request2.end(); + } catch (e) { + reject(e); + } + }); + } +}; +function extractPhysicalResourceId(event) { + switch (event.RequestType) { + case "Create": + return event.LogicalResourceId; + case "Update": + case "Delete": + return event.PhysicalResourceId; + } +} + +// lib/assertions/providers/lambda-handler/assertion.ts +var AssertionHandler = class extends CustomResourceHandler { + async processEvent(request2) { + let actual = decodeCall(request2.actual); + const expected = decodeCall(request2.expected); + let result; + const matcher = new MatchCreator(expected).getMatcher(); + console.log(`Testing equality between ${JSON.stringify(request2.actual)} and ${JSON.stringify(request2.expected)}`); + const matchResult = matcher.test(actual); + matchResult.finished(); + if (matchResult.hasFailed()) { + result = { + data: JSON.stringify({ + status: "fail", + message: [ + ...matchResult.toHumanStrings(), + JSON.stringify(matchResult.target, void 0, 2) + ].join("\n") + }) + }; + if (request2.failDeployment) { + throw new Error(result.data); + } + } else { + result = { + data: JSON.stringify({ + status: "success" + }) + }; + } + return result; + } +}; +var MatchCreator = class { + constructor(obj) { + this.parsedObj = { + matcher: obj + }; + } + getMatcher() { + try { + const final = JSON.parse(JSON.stringify(this.parsedObj), function(_k, v) { + const nested = Object.keys(v)[0]; + switch (nested) { + case "$ArrayWith": + return Match.arrayWith(v[nested]); + case "$ObjectLike": + return Match.objectLike(v[nested]); + case "$StringLike": + return Match.stringLikeRegexp(v[nested]); + default: + return v; + } + }); + if (Matcher.isMatcher(final.matcher)) { + return final.matcher; + } + return Match.exact(final.matcher); + } catch { + return Match.exact(this.parsedObj.matcher); + } + } +}; +function decodeCall(call) { + if (!call) { + return void 0; + } + try { + const parsed = JSON.parse(call); + return parsed; + } catch (e) { + return call; + } +} + +// lib/assertions/providers/lambda-handler/utils.ts +function decode(object) { + return JSON.parse(JSON.stringify(object), (_k, v) => { + switch (v) { + case "TRUE:BOOLEAN": + return true; + case "FALSE:BOOLEAN": + return false; + default: + return v; + } + }); +} + +// lib/assertions/providers/lambda-handler/sdk.ts +function flatten(object) { + return Object.assign( + {}, + ...function _flatten(child, path = []) { + return [].concat(...Object.keys(child).map((key) => { + const childKey = Buffer.isBuffer(child[key]) ? child[key].toString("utf8") : child[key]; + return typeof childKey === "object" && childKey !== null ? _flatten(childKey, path.concat([key])) : { [path.concat([key]).join(".")]: childKey }; + })); + }(object) + ); +} +var AwsApiCallHandler = class extends CustomResourceHandler { + async processEvent(request2) { + const AWS = require("aws-sdk"); + console.log(`AWS SDK VERSION: ${AWS.VERSION}`); + const service = new AWS[request2.service](); + const response = await service[request2.api](request2.parameters && decode(request2.parameters)).promise(); + console.log(`SDK response received ${JSON.stringify(response)}`); + delete response.ResponseMetadata; + const respond = { + apiCallResponse: response + }; + const flatData = { + ...flatten(respond) + }; + return request2.flattenResponse === "true" ? flatData : respond; + } +}; + +// lib/assertions/providers/lambda-handler/types.ts +var ASSERT_RESOURCE_TYPE = "Custom::DeployAssert@AssertEquals"; +var SDK_RESOURCE_TYPE_PREFIX = "Custom::DeployAssert@SdkCall"; + +// lib/assertions/providers/lambda-handler/index.ts +async function handler(event, context) { + const provider = createResourceHandler(event, context); + await provider.handle(); +} +function createResourceHandler(event, context) { + if (event.ResourceType.startsWith(SDK_RESOURCE_TYPE_PREFIX)) { + return new AwsApiCallHandler(event, context); + } + switch (event.ResourceType) { + case ASSERT_RESOURCE_TYPE: + return new AssertionHandler(event, context); + default: + throw new Error(`Unsupported resource type "${event.ResourceType}`); + } +} +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + handler +}); diff --git a/packages/@aws-cdk/aws-lambda-destinations/test/destinations.integ.snapshot/aws-cdk-lambda-destinations.assets.json b/packages/@aws-cdk/aws-lambda-destinations/test/destinations.integ.snapshot/aws-cdk-lambda-destinations.assets.json deleted file mode 100644 index bd82b455d9a91..0000000000000 --- a/packages/@aws-cdk/aws-lambda-destinations/test/destinations.integ.snapshot/aws-cdk-lambda-destinations.assets.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "version": "17.0.0", - "files": { - "476828076c099a22440fd1246ae789476cab04cb80080db5c91b577ec07db938": { - "source": { - "path": "aws-cdk-lambda-destinations.template.json", - "packaging": "file" - }, - "destinations": { - "current_account-current_region": { - "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "476828076c099a22440fd1246ae789476cab04cb80080db5c91b577ec07db938.json", - "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" - } - } - } - }, - "dockerImages": {} -} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-destinations/test/destinations.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-lambda-destinations/test/destinations.integ.snapshot/cdk.out index ccdfc1ff96a9d..8ecc185e9dbee 100644 --- a/packages/@aws-cdk/aws-lambda-destinations/test/destinations.integ.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-lambda-destinations/test/destinations.integ.snapshot/cdk.out @@ -1 +1 @@ -{"version":"19.0.0"} \ No newline at end of file +{"version":"21.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-destinations/test/destinations.integ.snapshot/integ.json b/packages/@aws-cdk/aws-lambda-destinations/test/destinations.integ.snapshot/integ.json index 4e8898a726ff8..2a51e26d991f3 100644 --- a/packages/@aws-cdk/aws-lambda-destinations/test/destinations.integ.snapshot/integ.json +++ b/packages/@aws-cdk/aws-lambda-destinations/test/destinations.integ.snapshot/integ.json @@ -1,11 +1,12 @@ { - "version": "20.0.0", + "version": "21.0.0", "testCases": { "Destinations/DefaultTest": { "stacks": [ "aws-cdk-lambda-destinations" ], - "assertionStack": "DestinationsDefaultTestDeployAssertCC49E667" + "assertionStack": "Destinations/DefaultTest/DeployAssert", + "assertionStackName": "DestinationsDefaultTestDeployAssertCC49E667" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-destinations/test/destinations.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-lambda-destinations/test/destinations.integ.snapshot/manifest.json index 87df11e84970f..780b70011a142 100644 --- a/packages/@aws-cdk/aws-lambda-destinations/test/destinations.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-lambda-destinations/test/destinations.integ.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "19.0.0", + "version": "21.0.0", "artifacts": { "Tree": { "type": "cdk:tree", @@ -135,74 +135,74 @@ { "type": "aws:cdk:asset", "data": { - "path": "asset.1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38b.bundle", - "id": "1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38b", + "path": "asset.84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7.bundle", + "id": "84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7", "packaging": "zip", - "sourceHash": "1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38b", - "s3BucketParameter": "AssetParameters1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38bS3BucketF7210344", - "s3KeyParameter": "AssetParameters1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38bS3VersionKey1E71961C", - "artifactHashParameter": "AssetParameters1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38bArtifactHash4F8362F2" + "sourceHash": "84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7", + "s3BucketParameter": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3BucketA2BC9E80", + "s3KeyParameter": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3VersionKeyB8E92EFE", + "artifactHashParameter": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7ArtifactHashB8137036" } } ], - "/Destinations/DefaultTest/DeployAssert/Default/LambdaInvoked12df417a1b74909abb3ea643735a310/Default/Default": [ + "/Destinations/DefaultTest/DeployAssert/LambdaInvoked12df417a1b74909abb3ea643735a310/Default/Default": [ { "type": "aws:cdk:logicalId", "data": "LambdaInvoked12df417a1b74909abb3ea643735a310" } ], - "/Destinations/DefaultTest/DeployAssert/Default/LambdaInvoked12df417a1b74909abb3ea643735a310/Invoke": [ + "/Destinations/DefaultTest/DeployAssert/LambdaInvoked12df417a1b74909abb3ea643735a310/Invoke": [ { "type": "aws:cdk:logicalId", "data": "LambdaInvoked12df417a1b74909abb3ea643735a310InvokeF590C289" } ], - "/Destinations/DefaultTest/DeployAssert/Default/AwsApiCallSQSreceiveMessage/Default/Default": [ + "/Destinations/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Role": [ { "type": "aws:cdk:logicalId", - "data": "AwsApiCallSQSreceiveMessage" + "data": "SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73" } ], - "/Destinations/DefaultTest/DeployAssert/Default/AwsApiCallSQSreceiveMessage/AssertEqualsSQSreceiveMessage/Default/Default": [ + "/Destinations/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Handler": [ { "type": "aws:cdk:logicalId", - "data": "AwsApiCallSQSreceiveMessageAssertEqualsSQSreceiveMessage56120636" + "data": "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F" } ], - "/Destinations/DefaultTest/DeployAssert/Default/AwsApiCallSQSreceiveMessage/AssertEqualsSQSreceiveMessage/AssertionResults": [ + "/Destinations/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/S3Bucket": [ { "type": "aws:cdk:logicalId", - "data": "AssertionResultsAssertEqualsSQSreceiveMessage" + "data": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3BucketA2BC9E80" } ], - "/Destinations/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Role": [ + "/Destinations/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/S3VersionKey": [ { "type": "aws:cdk:logicalId", - "data": "SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73" + "data": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3VersionKeyB8E92EFE" } ], - "/Destinations/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Handler": [ + "/Destinations/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/ArtifactHash": [ { "type": "aws:cdk:logicalId", - "data": "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F" + "data": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7ArtifactHashB8137036" } ], - "/Destinations/DefaultTest/DeployAssert/AssetParameters/1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38b/S3Bucket": [ + "/Destinations/DefaultTest/DeployAssert/AwsApiCallSQSreceiveMessage/Default/Default": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38bS3BucketF7210344" + "data": "AwsApiCallSQSreceiveMessage" } ], - "/Destinations/DefaultTest/DeployAssert/AssetParameters/1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38b/S3VersionKey": [ + "/Destinations/DefaultTest/DeployAssert/AwsApiCallSQSreceiveMessage/AssertEqualsSQSreceiveMessage/Default/Default": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38bS3VersionKey1E71961C" + "data": "AwsApiCallSQSreceiveMessageAssertEqualsSQSreceiveMessage56120636" } ], - "/Destinations/DefaultTest/DeployAssert/AssetParameters/1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38b/ArtifactHash": [ + "/Destinations/DefaultTest/DeployAssert/AwsApiCallSQSreceiveMessage/AssertEqualsSQSreceiveMessage/AssertionResults": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38bArtifactHash4F8362F2" + "data": "AssertionResultsAssertEqualsSQSreceiveMessage" } ] }, diff --git a/packages/@aws-cdk/aws-lambda-destinations/test/destinations.integ.snapshot/tree.json b/packages/@aws-cdk/aws-lambda-destinations/test/destinations.integ.snapshot/tree.json index 53a29b1fdc866..34975c0e50cdb 100644 --- a/packages/@aws-cdk/aws-lambda-destinations/test/destinations.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-lambda-destinations/test/destinations.integ.snapshot/tree.json @@ -9,7 +9,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.0.9" + "version": "10.1.85" } }, "aws-cdk-lambda-destinations": { @@ -520,8 +520,8 @@ "id": "DefaultEventBus", "path": "aws-cdk-lambda-destinations/EventBusLambda/EventInvokeConfig/DefaultEventBus", "constructInfo": { - "fqn": "@aws-cdk/core.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "Resource": { @@ -616,8 +616,8 @@ "id": "ScalingRole", "path": "aws-cdk-lambda-destinations/MySpecialAlias/ScalingRole", "constructInfo": { - "fqn": "@aws-cdk/core.Resource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "EventInvokeConfig": { @@ -690,28 +690,28 @@ "id": "Output{\"Ref\":\"SnsSqsC4810B27\"}", "path": "aws-cdk-lambda-destinations/Exports/Output{\"Ref\":\"SnsSqsC4810B27\"}", "constructInfo": { - "fqn": "@aws-cdk/core.CfnOutput", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "Output{\"Ref\":\"Queue4A7E3555\"}": { "id": "Output{\"Ref\":\"Queue4A7E3555\"}", "path": "aws-cdk-lambda-destinations/Exports/Output{\"Ref\":\"Queue4A7E3555\"}", "constructInfo": { - "fqn": "@aws-cdk/core.CfnOutput", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.Construct", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.Stack", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "Destinations": { @@ -722,171 +722,69 @@ "id": "DefaultTest", "path": "Destinations/DefaultTest", "children": { + "Default": { + "id": "Default", + "path": "Destinations/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.85" + } + }, "DeployAssert": { "id": "DeployAssert", "path": "Destinations/DefaultTest/DeployAssert", "children": { - "Default": { - "id": "Default", - "path": "Destinations/DefaultTest/DeployAssert/Default", + "LambdaInvoked12df417a1b74909abb3ea643735a310": { + "id": "LambdaInvoked12df417a1b74909abb3ea643735a310", + "path": "Destinations/DefaultTest/DeployAssert/LambdaInvoked12df417a1b74909abb3ea643735a310", "children": { - "LambdaInvoked12df417a1b74909abb3ea643735a310": { - "id": "LambdaInvoked12df417a1b74909abb3ea643735a310", - "path": "Destinations/DefaultTest/DeployAssert/Default/LambdaInvoked12df417a1b74909abb3ea643735a310", + "SdkProvider": { + "id": "SdkProvider", + "path": "Destinations/DefaultTest/DeployAssert/LambdaInvoked12df417a1b74909abb3ea643735a310/SdkProvider", "children": { - "SdkProvider": { - "id": "SdkProvider", - "path": "Destinations/DefaultTest/DeployAssert/Default/LambdaInvoked12df417a1b74909abb3ea643735a310/SdkProvider", - "children": { - "AssertionsProvider": { - "id": "AssertionsProvider", - "path": "Destinations/DefaultTest/DeployAssert/Default/LambdaInvoked12df417a1b74909abb3ea643735a310/SdkProvider/AssertionsProvider", - "constructInfo": { - "fqn": "@aws-cdk/core.Construct", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/integ-tests.AssertionsProvider", - "version": "0.0.0" - } - }, - "Default": { - "id": "Default", - "path": "Destinations/DefaultTest/DeployAssert/Default/LambdaInvoked12df417a1b74909abb3ea643735a310/Default", - "children": { - "Default": { - "id": "Default", - "path": "Destinations/DefaultTest/DeployAssert/Default/LambdaInvoked12df417a1b74909abb3ea643735a310/Default/Default", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" - } - } - }, + "AssertionsProvider": { + "id": "AssertionsProvider", + "path": "Destinations/DefaultTest/DeployAssert/LambdaInvoked12df417a1b74909abb3ea643735a310/SdkProvider/AssertionsProvider", "constructInfo": { - "fqn": "@aws-cdk/core.CustomResource", - "version": "0.0.0" - } - }, - "Invoke": { - "id": "Invoke", - "path": "Destinations/DefaultTest/DeployAssert/Default/LambdaInvoked12df417a1b74909abb3ea643735a310/Invoke", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { - "fqn": "@aws-cdk/integ-tests.LambdaInvokeFunction", + "fqn": "@aws-cdk/integ-tests.AssertionsProvider", "version": "0.0.0" } }, - "AwsApiCallSQSreceiveMessage": { - "id": "AwsApiCallSQSreceiveMessage", - "path": "Destinations/DefaultTest/DeployAssert/Default/AwsApiCallSQSreceiveMessage", + "Default": { + "id": "Default", + "path": "Destinations/DefaultTest/DeployAssert/LambdaInvoked12df417a1b74909abb3ea643735a310/Default", "children": { - "SdkProvider": { - "id": "SdkProvider", - "path": "Destinations/DefaultTest/DeployAssert/Default/AwsApiCallSQSreceiveMessage/SdkProvider", - "children": { - "AssertionsProvider": { - "id": "AssertionsProvider", - "path": "Destinations/DefaultTest/DeployAssert/Default/AwsApiCallSQSreceiveMessage/SdkProvider/AssertionsProvider", - "constructInfo": { - "fqn": "@aws-cdk/core.Construct", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/integ-tests.AssertionsProvider", - "version": "0.0.0" - } - }, "Default": { "id": "Default", - "path": "Destinations/DefaultTest/DeployAssert/Default/AwsApiCallSQSreceiveMessage/Default", - "children": { - "Default": { - "id": "Default", - "path": "Destinations/DefaultTest/DeployAssert/Default/AwsApiCallSQSreceiveMessage/Default/Default", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" - } - } - }, + "path": "Destinations/DefaultTest/DeployAssert/LambdaInvoked12df417a1b74909abb3ea643735a310/Default/Default", "constructInfo": { - "fqn": "@aws-cdk/core.CustomResource", - "version": "0.0.0" - } - }, - "AssertEqualsSQSreceiveMessage": { - "id": "AssertEqualsSQSreceiveMessage", - "path": "Destinations/DefaultTest/DeployAssert/Default/AwsApiCallSQSreceiveMessage/AssertEqualsSQSreceiveMessage", - "children": { - "AssertionProvider": { - "id": "AssertionProvider", - "path": "Destinations/DefaultTest/DeployAssert/Default/AwsApiCallSQSreceiveMessage/AssertEqualsSQSreceiveMessage/AssertionProvider", - "children": { - "AssertionsProvider": { - "id": "AssertionsProvider", - "path": "Destinations/DefaultTest/DeployAssert/Default/AwsApiCallSQSreceiveMessage/AssertEqualsSQSreceiveMessage/AssertionProvider/AssertionsProvider", - "constructInfo": { - "fqn": "@aws-cdk/core.Construct", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/integ-tests.AssertionsProvider", - "version": "0.0.0" - } - }, - "Default": { - "id": "Default", - "path": "Destinations/DefaultTest/DeployAssert/Default/AwsApiCallSQSreceiveMessage/AssertEqualsSQSreceiveMessage/Default", - "children": { - "Default": { - "id": "Default", - "path": "Destinations/DefaultTest/DeployAssert/Default/AwsApiCallSQSreceiveMessage/AssertEqualsSQSreceiveMessage/Default/Default", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/core.CustomResource", - "version": "0.0.0" - } - }, - "AssertionResults": { - "id": "AssertionResults", - "path": "Destinations/DefaultTest/DeployAssert/Default/AwsApiCallSQSreceiveMessage/AssertEqualsSQSreceiveMessage/AssertionResults", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnOutput", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/integ-tests.EqualsAssertion", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { - "fqn": "@aws-cdk/integ-tests.AwsApiCall", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" + } + }, + "Invoke": { + "id": "Invoke", + "path": "Destinations/DefaultTest/DeployAssert/LambdaInvoked12df417a1b74909abb3ea643735a310/Invoke", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { - "fqn": "@aws-cdk/integ-tests.DeployAssert", + "fqn": "@aws-cdk/integ-tests.LambdaInvokeFunction", "version": "0.0.0" } }, @@ -898,98 +796,198 @@ "id": "Staging", "path": "Destinations/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Staging", "constructInfo": { - "fqn": "@aws-cdk/core.AssetStaging", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "Role": { "id": "Role", "path": "Destinations/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Role", "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "Handler": { "id": "Handler", "path": "Destinations/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Handler", "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.Construct", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "AssetParameters": { "id": "AssetParameters", "path": "Destinations/DefaultTest/DeployAssert/AssetParameters", "children": { - "1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38b": { - "id": "1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38b", - "path": "Destinations/DefaultTest/DeployAssert/AssetParameters/1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38b", + "84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7": { + "id": "84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7", + "path": "Destinations/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7", "children": { "S3Bucket": { "id": "S3Bucket", - "path": "Destinations/DefaultTest/DeployAssert/AssetParameters/1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38b/S3Bucket", + "path": "Destinations/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/S3Bucket", "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "S3VersionKey": { "id": "S3VersionKey", - "path": "Destinations/DefaultTest/DeployAssert/AssetParameters/1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38b/S3VersionKey", + "path": "Destinations/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/S3VersionKey", "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "ArtifactHash": { "id": "ArtifactHash", - "path": "Destinations/DefaultTest/DeployAssert/AssetParameters/1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38b/ArtifactHash", + "path": "Destinations/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/ArtifactHash", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.85" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.85" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.85" + } + }, + "AwsApiCallSQSreceiveMessage": { + "id": "AwsApiCallSQSreceiveMessage", + "path": "Destinations/DefaultTest/DeployAssert/AwsApiCallSQSreceiveMessage", + "children": { + "SdkProvider": { + "id": "SdkProvider", + "path": "Destinations/DefaultTest/DeployAssert/AwsApiCallSQSreceiveMessage/SdkProvider", + "children": { + "AssertionsProvider": { + "id": "AssertionsProvider", + "path": "Destinations/DefaultTest/DeployAssert/AwsApiCallSQSreceiveMessage/SdkProvider/AssertionsProvider", "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", + "fqn": "constructs.Construct", + "version": "10.1.85" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.AssertionsProvider", + "version": "0.0.0" + } + }, + "Default": { + "id": "Default", + "path": "Destinations/DefaultTest/DeployAssert/AwsApiCallSQSreceiveMessage/Default", + "children": { + "Default": { + "id": "Default", + "path": "Destinations/DefaultTest/DeployAssert/AwsApiCallSQSreceiveMessage/Default/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.85" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.85" + } + }, + "AssertEqualsSQSreceiveMessage": { + "id": "AssertEqualsSQSreceiveMessage", + "path": "Destinations/DefaultTest/DeployAssert/AwsApiCallSQSreceiveMessage/AssertEqualsSQSreceiveMessage", + "children": { + "AssertionProvider": { + "id": "AssertionProvider", + "path": "Destinations/DefaultTest/DeployAssert/AwsApiCallSQSreceiveMessage/AssertEqualsSQSreceiveMessage/AssertionProvider", + "children": { + "AssertionsProvider": { + "id": "AssertionsProvider", + "path": "Destinations/DefaultTest/DeployAssert/AwsApiCallSQSreceiveMessage/AssertEqualsSQSreceiveMessage/AssertionProvider/AssertionsProvider", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.85" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.AssertionsProvider", "version": "0.0.0" } + }, + "Default": { + "id": "Default", + "path": "Destinations/DefaultTest/DeployAssert/AwsApiCallSQSreceiveMessage/AssertEqualsSQSreceiveMessage/Default", + "children": { + "Default": { + "id": "Default", + "path": "Destinations/DefaultTest/DeployAssert/AwsApiCallSQSreceiveMessage/AssertEqualsSQSreceiveMessage/Default/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.85" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.85" + } + }, + "AssertionResults": { + "id": "AssertionResults", + "path": "Destinations/DefaultTest/DeployAssert/AwsApiCallSQSreceiveMessage/AssertEqualsSQSreceiveMessage/AssertionResults", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.85" + } } }, "constructInfo": { - "fqn": "@aws-cdk/core.Construct", + "fqn": "@aws-cdk/integ-tests.EqualsAssertion", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.Construct", + "fqn": "@aws-cdk/integ-tests.AwsApiCall", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.Stack", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.Construct", + "fqn": "@aws-cdk/integ-tests.IntegTestCase", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.Construct", + "fqn": "@aws-cdk/integ-tests.IntegTest", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.App", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda-destinations/test/integ.destinations.ts b/packages/@aws-cdk/aws-lambda-destinations/test/integ.destinations.ts index 5dd67661acbb8..f3d6293fc2455 100644 --- a/packages/@aws-cdk/aws-lambda-destinations/test/integ.destinations.ts +++ b/packages/@aws-cdk/aws-lambda-destinations/test/integ.destinations.ts @@ -96,5 +96,3 @@ message.assertAtPath('Messages.0.Body', ExpectedResult.objectLike({ }, responsePayload: 'success', })); - -app.synth(); diff --git a/packages/@aws-cdk/aws-lambda/test/bundling.docker-opts.integ.snapshot/BundlingDefaultTestDeployAssertAACA0CAF.template.json b/packages/@aws-cdk/aws-lambda/test/bundling.docker-opts.integ.snapshot/DockerOptsBundlingDefaultTestDeployAssert72BE28F7.template.json similarity index 80% rename from packages/@aws-cdk/aws-lambda/test/bundling.docker-opts.integ.snapshot/BundlingDefaultTestDeployAssertAACA0CAF.template.json rename to packages/@aws-cdk/aws-lambda/test/bundling.docker-opts.integ.snapshot/DockerOptsBundlingDefaultTestDeployAssert72BE28F7.template.json index 7db53b9a92c99..cb1ed28148757 100644 --- a/packages/@aws-cdk/aws-lambda/test/bundling.docker-opts.integ.snapshot/BundlingDefaultTestDeployAssertAACA0CAF.template.json +++ b/packages/@aws-cdk/aws-lambda/test/bundling.docker-opts.integ.snapshot/DockerOptsBundlingDefaultTestDeployAssert72BE28F7.template.json @@ -17,7 +17,7 @@ } }, "flattenResponse": "false", - "salt": "1659700764721" + "salt": "1661796444486" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -53,7 +53,7 @@ ] }, "expected": "{\"$ObjectLike\":{\"Payload\":\"200\"}}", - "salt": "1659700764722" + "salt": "1661796444487" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -136,7 +136,7 @@ "Runtime": "nodejs14.x", "Code": { "S3Bucket": { - "Ref": "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdS3BucketF94385B7" + "Ref": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3BucketA2BC9E80" }, "S3Key": { "Fn::Join": [ @@ -149,7 +149,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdS3VersionKey66DB0F9E" + "Ref": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3VersionKeyB8E92EFE" } ] } @@ -162,7 +162,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdS3VersionKey66DB0F9E" + "Ref": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3VersionKeyB8E92EFE" } ] } @@ -194,17 +194,17 @@ } }, "Parameters": { - "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdS3BucketF94385B7": { + "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3BucketA2BC9E80": { "Type": "String", - "Description": "S3 bucket for asset \"0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd\"" + "Description": "S3 bucket for asset \"84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7\"" }, - "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdS3VersionKey66DB0F9E": { + "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3VersionKeyB8E92EFE": { "Type": "String", - "Description": "S3 key for asset version \"0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd\"" + "Description": "S3 key for asset version \"84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7\"" }, - "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdArtifactHash2AC894D9": { + "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7ArtifactHashB8137036": { "Type": "String", - "Description": "Artifact hash for asset \"0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd\"" + "Description": "Artifact hash for asset \"84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7\"" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda/test/bundling.docker-opts.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-lambda/test/bundling.docker-opts.integ.snapshot/cdk.out index 588d7b269d34f..8ecc185e9dbee 100644 --- a/packages/@aws-cdk/aws-lambda/test/bundling.docker-opts.integ.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-lambda/test/bundling.docker-opts.integ.snapshot/cdk.out @@ -1 +1 @@ -{"version":"20.0.0"} \ No newline at end of file +{"version":"21.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda/test/bundling.docker-opts.integ.snapshot/integ.json b/packages/@aws-cdk/aws-lambda/test/bundling.docker-opts.integ.snapshot/integ.json index 73d0ae4a3a54f..03558532ae524 100644 --- a/packages/@aws-cdk/aws-lambda/test/bundling.docker-opts.integ.snapshot/integ.json +++ b/packages/@aws-cdk/aws-lambda/test/bundling.docker-opts.integ.snapshot/integ.json @@ -1,12 +1,13 @@ { - "version": "20.0.0", + "version": "21.0.0", "testCases": { - "Bundling/DefaultTest": { + "DockerOptsBundling/DefaultTest": { "stacks": [ "cdk-integ-lambda-bundling-docker-bundling-opts" ], "stackUpdateWorkflow": false, - "assertionStack": "BundlingDefaultTestDeployAssertAACA0CAF" + "assertionStack": "DockerOptsBundling/DefaultTest/DeployAssert", + "assertionStackName": "DockerOptsBundlingDefaultTestDeployAssert72BE28F7" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda/test/bundling.docker-opts.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-lambda/test/bundling.docker-opts.integ.snapshot/manifest.json index def0254a06124..36aa82fdc6297 100644 --- a/packages/@aws-cdk/aws-lambda/test/bundling.docker-opts.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-lambda/test/bundling.docker-opts.integ.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "artifacts": { "Tree": { "type": "cdk:tree", @@ -68,87 +68,87 @@ }, "displayName": "cdk-integ-lambda-bundling-docker-bundling-opts" }, - "BundlingDefaultTestDeployAssertAACA0CAF": { + "DockerOptsBundlingDefaultTestDeployAssert72BE28F7": { "type": "aws:cloudformation:stack", "environment": "aws://unknown-account/unknown-region", "properties": { - "templateFile": "BundlingDefaultTestDeployAssertAACA0CAF.template.json", + "templateFile": "DockerOptsBundlingDefaultTestDeployAssert72BE28F7.template.json", "validateOnSynth": false }, "dependencies": [ "cdk-integ-lambda-bundling-docker-bundling-opts" ], "metadata": { - "/Bundling/DefaultTest/DeployAssert": [ + "/DockerOptsBundling/DefaultTest/DeployAssert": [ { "type": "aws:cdk:asset", "data": { - "path": "asset.0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd.bundle", - "id": "0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd", + "path": "asset.84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7.bundle", + "id": "84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7", "packaging": "zip", - "sourceHash": "0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd", - "s3BucketParameter": "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdS3BucketF94385B7", - "s3KeyParameter": "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdS3VersionKey66DB0F9E", - "artifactHashParameter": "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdArtifactHash2AC894D9" + "sourceHash": "84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7", + "s3BucketParameter": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3BucketA2BC9E80", + "s3KeyParameter": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3VersionKeyB8E92EFE", + "artifactHashParameter": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7ArtifactHashB8137036" } } ], - "/Bundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/Default/Default": [ + "/DockerOptsBundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/Default/Default": [ { "type": "aws:cdk:logicalId", "data": "LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8" } ], - "/Bundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/Invoke": [ + "/DockerOptsBundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/Invoke": [ { "type": "aws:cdk:logicalId", "data": "LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8InvokeA3F6E40A" } ], - "/Bundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/AssertEqualsLambdainvoke/Default/Default": [ + "/DockerOptsBundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/AssertEqualsLambdainvoke/Default/Default": [ { "type": "aws:cdk:logicalId", "data": "LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8AssertEqualsLambdainvoke89C63F4A" } ], - "/Bundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/AssertEqualsLambdainvoke/AssertionResults": [ + "/DockerOptsBundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/AssertEqualsLambdainvoke/AssertionResults": [ { "type": "aws:cdk:logicalId", "data": "AssertionResultsAssertEqualsLambdainvoke" } ], - "/Bundling/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Role": [ + "/DockerOptsBundling/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Role": [ { "type": "aws:cdk:logicalId", "data": "SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73" } ], - "/Bundling/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Handler": [ + "/DockerOptsBundling/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Handler": [ { "type": "aws:cdk:logicalId", "data": "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F" } ], - "/Bundling/DefaultTest/DeployAssert/AssetParameters/0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd/S3Bucket": [ + "/DockerOptsBundling/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/S3Bucket": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdS3BucketF94385B7" + "data": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3BucketA2BC9E80" } ], - "/Bundling/DefaultTest/DeployAssert/AssetParameters/0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd/S3VersionKey": [ + "/DockerOptsBundling/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/S3VersionKey": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdS3VersionKey66DB0F9E" + "data": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3VersionKeyB8E92EFE" } ], - "/Bundling/DefaultTest/DeployAssert/AssetParameters/0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd/ArtifactHash": [ + "/DockerOptsBundling/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/ArtifactHash": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdArtifactHash2AC894D9" + "data": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7ArtifactHashB8137036" } ] }, - "displayName": "Bundling/DefaultTest/DeployAssert" + "displayName": "DockerOptsBundling/DefaultTest/DeployAssert" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda/test/bundling.docker-opts.integ.snapshot/tree.json b/packages/@aws-cdk/aws-lambda/test/bundling.docker-opts.integ.snapshot/tree.json index 3528b43171152..95bd619d10d50 100644 --- a/packages/@aws-cdk/aws-lambda/test/bundling.docker-opts.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-lambda/test/bundling.docker-opts.integ.snapshot/tree.json @@ -9,7 +9,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.58" + "version": "10.1.85" } }, "cdk-integ-lambda-bundling-docker-bundling-opts": { @@ -77,8 +77,8 @@ "id": "Stage", "path": "cdk-integ-lambda-bundling-docker-bundling-opts/Function/Code/Stage", "constructInfo": { - "fqn": "@aws-cdk/core.AssetStaging", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "AssetBucket": { @@ -172,36 +172,36 @@ "id": "S3Bucket", "path": "cdk-integ-lambda-bundling-docker-bundling-opts/AssetParameters/badc2d9df4b50b7ee1eaf05b055fa93217d48bfecf7ad59a8fdac427eea82668/S3Bucket", "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "S3VersionKey": { "id": "S3VersionKey", "path": "cdk-integ-lambda-bundling-docker-bundling-opts/AssetParameters/badc2d9df4b50b7ee1eaf05b055fa93217d48bfecf7ad59a8fdac427eea82668/S3VersionKey", "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "ArtifactHash": { "id": "ArtifactHash", "path": "cdk-integ-lambda-bundling-docker-bundling-opts/AssetParameters/badc2d9df4b50b7ee1eaf05b055fa93217d48bfecf7ad59a8fdac427eea82668/ArtifactHash", "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.58" + "version": "10.1.85" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.58" + "version": "10.1.85" } }, "Exports": { @@ -212,56 +212,56 @@ "id": "Output{\"Ref\":\"Function76856677\"}", "path": "cdk-integ-lambda-bundling-docker-bundling-opts/Exports/Output{\"Ref\":\"Function76856677\"}", "constructInfo": { - "fqn": "@aws-cdk/core.CfnOutput", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.58" + "version": "10.1.85" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.Stack", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, - "Bundling": { - "id": "Bundling", - "path": "Bundling", + "DockerOptsBundling": { + "id": "DockerOptsBundling", + "path": "DockerOptsBundling", "children": { "DefaultTest": { "id": "DefaultTest", - "path": "Bundling/DefaultTest", + "path": "DockerOptsBundling/DefaultTest", "children": { "Default": { "id": "Default", - "path": "Bundling/DefaultTest/Default", + "path": "DockerOptsBundling/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.58" + "version": "10.1.85" } }, "DeployAssert": { "id": "DeployAssert", - "path": "Bundling/DefaultTest/DeployAssert", + "path": "DockerOptsBundling/DefaultTest/DeployAssert", "children": { "LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8": { "id": "LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8", - "path": "Bundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8", + "path": "DockerOptsBundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8", "children": { "SdkProvider": { "id": "SdkProvider", - "path": "Bundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/SdkProvider", + "path": "DockerOptsBundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/SdkProvider", "children": { "AssertionsProvider": { "id": "AssertionsProvider", - "path": "Bundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/SdkProvider/AssertionsProvider", + "path": "DockerOptsBundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/SdkProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.58" + "version": "10.1.85" } } }, @@ -272,44 +272,44 @@ }, "Default": { "id": "Default", - "path": "Bundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/Default", + "path": "DockerOptsBundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/Default", "children": { "Default": { "id": "Default", - "path": "Bundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/Default/Default", + "path": "DockerOptsBundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/Default/Default", "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.CustomResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "Invoke": { "id": "Invoke", - "path": "Bundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/Invoke", + "path": "DockerOptsBundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/Invoke", "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "AssertEqualsLambdainvoke": { "id": "AssertEqualsLambdainvoke", - "path": "Bundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/AssertEqualsLambdainvoke", + "path": "DockerOptsBundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/AssertEqualsLambdainvoke", "children": { "AssertionProvider": { "id": "AssertionProvider", - "path": "Bundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/AssertEqualsLambdainvoke/AssertionProvider", + "path": "DockerOptsBundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/AssertEqualsLambdainvoke/AssertionProvider", "children": { "AssertionsProvider": { "id": "AssertionsProvider", - "path": "Bundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/AssertEqualsLambdainvoke/AssertionProvider/AssertionsProvider", + "path": "DockerOptsBundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/AssertEqualsLambdainvoke/AssertionProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.58" + "version": "10.1.85" } } }, @@ -320,28 +320,28 @@ }, "Default": { "id": "Default", - "path": "Bundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/AssertEqualsLambdainvoke/Default", + "path": "DockerOptsBundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/AssertEqualsLambdainvoke/Default", "children": { "Default": { "id": "Default", - "path": "Bundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/AssertEqualsLambdainvoke/Default/Default", + "path": "DockerOptsBundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/AssertEqualsLambdainvoke/Default/Default", "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.CustomResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "AssertionResults": { "id": "AssertionResults", - "path": "Bundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/AssertEqualsLambdainvoke/AssertionResults", + "path": "DockerOptsBundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/AssertEqualsLambdainvoke/AssertionResults", "constructInfo": { - "fqn": "@aws-cdk/core.CfnOutput", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, @@ -358,86 +358,86 @@ }, "SingletonFunction1488541a7b23466481b69b4408076b81": { "id": "SingletonFunction1488541a7b23466481b69b4408076b81", - "path": "Bundling/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81", + "path": "DockerOptsBundling/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81", "children": { "Staging": { "id": "Staging", - "path": "Bundling/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Staging", + "path": "DockerOptsBundling/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Staging", "constructInfo": { - "fqn": "@aws-cdk/core.AssetStaging", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "Role": { "id": "Role", - "path": "Bundling/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Role", + "path": "DockerOptsBundling/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Role", "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "Handler": { "id": "Handler", - "path": "Bundling/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Handler", + "path": "DockerOptsBundling/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Handler", "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.58" + "version": "10.1.85" } }, "AssetParameters": { "id": "AssetParameters", - "path": "Bundling/DefaultTest/DeployAssert/AssetParameters", + "path": "DockerOptsBundling/DefaultTest/DeployAssert/AssetParameters", "children": { - "0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd": { - "id": "0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd", - "path": "Bundling/DefaultTest/DeployAssert/AssetParameters/0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd", + "84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7": { + "id": "84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7", + "path": "DockerOptsBundling/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7", "children": { "S3Bucket": { "id": "S3Bucket", - "path": "Bundling/DefaultTest/DeployAssert/AssetParameters/0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd/S3Bucket", + "path": "DockerOptsBundling/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/S3Bucket", "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "S3VersionKey": { "id": "S3VersionKey", - "path": "Bundling/DefaultTest/DeployAssert/AssetParameters/0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd/S3VersionKey", + "path": "DockerOptsBundling/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/S3VersionKey", "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "ArtifactHash": { "id": "ArtifactHash", - "path": "Bundling/DefaultTest/DeployAssert/AssetParameters/0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd/ArtifactHash", + "path": "DockerOptsBundling/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/ArtifactHash", "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.58" + "version": "10.1.85" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.58" + "version": "10.1.85" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.Stack", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, @@ -454,8 +454,8 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/core.App", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda/test/bundling.integ.snapshot/BundlingDefaultTestDeployAssertAACA0CAF.template.json b/packages/@aws-cdk/aws-lambda/test/bundling.integ.snapshot/BundlingDefaultTestDeployAssertAACA0CAF.template.json index f1587148e1a58..fe04bd587cdcd 100644 --- a/packages/@aws-cdk/aws-lambda/test/bundling.integ.snapshot/BundlingDefaultTestDeployAssertAACA0CAF.template.json +++ b/packages/@aws-cdk/aws-lambda/test/bundling.integ.snapshot/BundlingDefaultTestDeployAssertAACA0CAF.template.json @@ -17,7 +17,7 @@ } }, "flattenResponse": "false", - "salt": "1651691789905" + "salt": "1661796444483" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -53,7 +53,7 @@ ] }, "expected": "{\"$ObjectLike\":{\"Payload\":\"200\"}}", - "salt": "1651691789906" + "salt": "1661796444484" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -136,7 +136,7 @@ "Runtime": "nodejs14.x", "Code": { "S3Bucket": { - "Ref": "AssetParameters1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38bS3BucketF7210344" + "Ref": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3BucketA2BC9E80" }, "S3Key": { "Fn::Join": [ @@ -149,7 +149,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38bS3VersionKey1E71961C" + "Ref": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3VersionKeyB8E92EFE" } ] } @@ -162,7 +162,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38bS3VersionKey1E71961C" + "Ref": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3VersionKeyB8E92EFE" } ] } @@ -194,17 +194,17 @@ } }, "Parameters": { - "AssetParameters1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38bS3BucketF7210344": { + "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3BucketA2BC9E80": { "Type": "String", - "Description": "S3 bucket for asset \"1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38b\"" + "Description": "S3 bucket for asset \"84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7\"" }, - "AssetParameters1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38bS3VersionKey1E71961C": { + "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3VersionKeyB8E92EFE": { "Type": "String", - "Description": "S3 key for asset version \"1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38b\"" + "Description": "S3 key for asset version \"84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7\"" }, - "AssetParameters1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38bArtifactHash4F8362F2": { + "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7ArtifactHashB8137036": { "Type": "String", - "Description": "Artifact hash for asset \"1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38b\"" + "Description": "Artifact hash for asset \"84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7\"" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda/test/bundling.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-lambda/test/bundling.integ.snapshot/cdk.out index ccdfc1ff96a9d..8ecc185e9dbee 100644 --- a/packages/@aws-cdk/aws-lambda/test/bundling.integ.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-lambda/test/bundling.integ.snapshot/cdk.out @@ -1 +1 @@ -{"version":"19.0.0"} \ No newline at end of file +{"version":"21.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda/test/bundling.integ.snapshot/integ.json b/packages/@aws-cdk/aws-lambda/test/bundling.integ.snapshot/integ.json index a439fddd2630b..40a0f64769c3b 100644 --- a/packages/@aws-cdk/aws-lambda/test/bundling.integ.snapshot/integ.json +++ b/packages/@aws-cdk/aws-lambda/test/bundling.integ.snapshot/integ.json @@ -1,12 +1,13 @@ { - "version": "20.0.0", + "version": "21.0.0", "testCases": { "Bundling/DefaultTest": { "stacks": [ "cdk-integ-lambda-bundling" ], "stackUpdateWorkflow": false, - "assertionStack": "BundlingDefaultTestDeployAssertAACA0CAF" + "assertionStack": "Bundling/DefaultTest/DeployAssert", + "assertionStackName": "BundlingDefaultTestDeployAssertAACA0CAF" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda/test/bundling.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-lambda/test/bundling.integ.snapshot/manifest.json index d49cacb755c4f..35e22f802aa36 100644 --- a/packages/@aws-cdk/aws-lambda/test/bundling.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-lambda/test/bundling.integ.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "19.0.0", + "version": "21.0.0", "artifacts": { "Tree": { "type": "cdk:tree", @@ -83,35 +83,35 @@ { "type": "aws:cdk:asset", "data": { - "path": "asset.1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38b.bundle", - "id": "1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38b", + "path": "asset.84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7.bundle", + "id": "84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7", "packaging": "zip", - "sourceHash": "1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38b", - "s3BucketParameter": "AssetParameters1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38bS3BucketF7210344", - "s3KeyParameter": "AssetParameters1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38bS3VersionKey1E71961C", - "artifactHashParameter": "AssetParameters1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38bArtifactHash4F8362F2" + "sourceHash": "84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7", + "s3BucketParameter": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3BucketA2BC9E80", + "s3KeyParameter": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3VersionKeyB8E92EFE", + "artifactHashParameter": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7ArtifactHashB8137036" } } ], - "/Bundling/DefaultTest/DeployAssert/Default/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/Default/Default": [ + "/Bundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/Default/Default": [ { "type": "aws:cdk:logicalId", "data": "LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8" } ], - "/Bundling/DefaultTest/DeployAssert/Default/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/Invoke": [ + "/Bundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/Invoke": [ { "type": "aws:cdk:logicalId", "data": "LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8InvokeA3F6E40A" } ], - "/Bundling/DefaultTest/DeployAssert/Default/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/AssertEqualsLambdainvoke/Default/Default": [ + "/Bundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/AssertEqualsLambdainvoke/Default/Default": [ { "type": "aws:cdk:logicalId", "data": "LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8AssertEqualsLambdainvoke89C63F4A" } ], - "/Bundling/DefaultTest/DeployAssert/Default/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/AssertEqualsLambdainvoke/AssertionResults": [ + "/Bundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/AssertEqualsLambdainvoke/AssertionResults": [ { "type": "aws:cdk:logicalId", "data": "AssertionResultsAssertEqualsLambdainvoke" @@ -129,22 +129,22 @@ "data": "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F" } ], - "/Bundling/DefaultTest/DeployAssert/AssetParameters/1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38b/S3Bucket": [ + "/Bundling/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/S3Bucket": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38bS3BucketF7210344" + "data": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3BucketA2BC9E80" } ], - "/Bundling/DefaultTest/DeployAssert/AssetParameters/1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38b/S3VersionKey": [ + "/Bundling/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/S3VersionKey": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38bS3VersionKey1E71961C" + "data": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3VersionKeyB8E92EFE" } ], - "/Bundling/DefaultTest/DeployAssert/AssetParameters/1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38b/ArtifactHash": [ + "/Bundling/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/ArtifactHash": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38bArtifactHash4F8362F2" + "data": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7ArtifactHashB8137036" } ] }, diff --git a/packages/@aws-cdk/aws-lambda/test/bundling.integ.snapshot/tree.json b/packages/@aws-cdk/aws-lambda/test/bundling.integ.snapshot/tree.json index 55062d01c72fa..deafa7bce9745 100644 --- a/packages/@aws-cdk/aws-lambda/test/bundling.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-lambda/test/bundling.integ.snapshot/tree.json @@ -8,8 +8,8 @@ "id": "Tree", "path": "Tree", "constructInfo": { - "fqn": "@aws-cdk/core.Construct", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "cdk-integ-lambda-bundling": { @@ -77,8 +77,8 @@ "id": "Stage", "path": "cdk-integ-lambda-bundling/Function/Code/Stage", "constructInfo": { - "fqn": "@aws-cdk/core.AssetStaging", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "AssetBucket": { @@ -172,36 +172,36 @@ "id": "S3Bucket", "path": "cdk-integ-lambda-bundling/AssetParameters/b0011b8704c0cceee88b3cdf79d915b7babbe192f420c472879803f44c2c374e/S3Bucket", "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "S3VersionKey": { "id": "S3VersionKey", "path": "cdk-integ-lambda-bundling/AssetParameters/b0011b8704c0cceee88b3cdf79d915b7babbe192f420c472879803f44c2c374e/S3VersionKey", "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "ArtifactHash": { "id": "ArtifactHash", "path": "cdk-integ-lambda-bundling/AssetParameters/b0011b8704c0cceee88b3cdf79d915b7babbe192f420c472879803f44c2c374e/ArtifactHash", "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.Construct", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.Construct", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "Exports": { @@ -212,20 +212,20 @@ "id": "Output{\"Ref\":\"Function76856677\"}", "path": "cdk-integ-lambda-bundling/Exports/Output{\"Ref\":\"Function76856677\"}", "constructInfo": { - "fqn": "@aws-cdk/core.CfnOutput", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.Construct", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.Stack", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "Bundling": { @@ -236,28 +236,80 @@ "id": "DefaultTest", "path": "Bundling/DefaultTest", "children": { + "Default": { + "id": "Default", + "path": "Bundling/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.85" + } + }, "DeployAssert": { "id": "DeployAssert", "path": "Bundling/DefaultTest/DeployAssert", "children": { - "Default": { - "id": "Default", - "path": "Bundling/DefaultTest/DeployAssert/Default", + "LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8": { + "id": "LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8", + "path": "Bundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8", "children": { - "LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8": { - "id": "LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8", - "path": "Bundling/DefaultTest/DeployAssert/Default/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8", + "SdkProvider": { + "id": "SdkProvider", + "path": "Bundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/SdkProvider", + "children": { + "AssertionsProvider": { + "id": "AssertionsProvider", + "path": "Bundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/SdkProvider/AssertionsProvider", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.85" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests.AssertionsProvider", + "version": "0.0.0" + } + }, + "Default": { + "id": "Default", + "path": "Bundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/Default", + "children": { + "Default": { + "id": "Default", + "path": "Bundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/Default/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.85" + } + } + }, + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.85" + } + }, + "Invoke": { + "id": "Invoke", + "path": "Bundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/Invoke", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.1.85" + } + }, + "AssertEqualsLambdainvoke": { + "id": "AssertEqualsLambdainvoke", + "path": "Bundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/AssertEqualsLambdainvoke", "children": { - "SdkProvider": { - "id": "SdkProvider", - "path": "Bundling/DefaultTest/DeployAssert/Default/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/SdkProvider", + "AssertionProvider": { + "id": "AssertionProvider", + "path": "Bundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/AssertEqualsLambdainvoke/AssertionProvider", "children": { "AssertionsProvider": { "id": "AssertionsProvider", - "path": "Bundling/DefaultTest/DeployAssert/Default/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/SdkProvider/AssertionsProvider", + "path": "Bundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/AssertEqualsLambdainvoke/AssertionProvider/AssertionsProvider", "constructInfo": { - "fqn": "@aws-cdk/core.Construct", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, @@ -268,93 +320,39 @@ }, "Default": { "id": "Default", - "path": "Bundling/DefaultTest/DeployAssert/Default/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/Default", + "path": "Bundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/AssertEqualsLambdainvoke/Default", "children": { "Default": { "id": "Default", - "path": "Bundling/DefaultTest/DeployAssert/Default/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/Default/Default", + "path": "Bundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/AssertEqualsLambdainvoke/Default/Default", "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.CustomResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, - "Invoke": { - "id": "Invoke", - "path": "Bundling/DefaultTest/DeployAssert/Default/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/Invoke", + "AssertionResults": { + "id": "AssertionResults", + "path": "Bundling/DefaultTest/DeployAssert/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/AssertEqualsLambdainvoke/AssertionResults", "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" - } - }, - "AssertEqualsLambdainvoke": { - "id": "AssertEqualsLambdainvoke", - "path": "Bundling/DefaultTest/DeployAssert/Default/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/AssertEqualsLambdainvoke", - "children": { - "AssertionProvider": { - "id": "AssertionProvider", - "path": "Bundling/DefaultTest/DeployAssert/Default/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/AssertEqualsLambdainvoke/AssertionProvider", - "children": { - "AssertionsProvider": { - "id": "AssertionsProvider", - "path": "Bundling/DefaultTest/DeployAssert/Default/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/AssertEqualsLambdainvoke/AssertionProvider/AssertionsProvider", - "constructInfo": { - "fqn": "@aws-cdk/core.Construct", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/integ-tests.AssertionsProvider", - "version": "0.0.0" - } - }, - "Default": { - "id": "Default", - "path": "Bundling/DefaultTest/DeployAssert/Default/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/AssertEqualsLambdainvoke/Default", - "children": { - "Default": { - "id": "Default", - "path": "Bundling/DefaultTest/DeployAssert/Default/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/AssertEqualsLambdainvoke/Default/Default", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/core.CustomResource", - "version": "0.0.0" - } - }, - "AssertionResults": { - "id": "AssertionResults", - "path": "Bundling/DefaultTest/DeployAssert/Default/LambdaInvoke55933c6da447c7ea94ebd3a50e8557a8/AssertEqualsLambdainvoke/AssertionResults", - "constructInfo": { - "fqn": "@aws-cdk/core.CfnOutput", - "version": "0.0.0" - } - } - }, - "constructInfo": { - "fqn": "@aws-cdk/integ-tests.EqualsAssertion", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { - "fqn": "@aws-cdk/integ-tests.LambdaInvokeFunction", + "fqn": "@aws-cdk/integ-tests.EqualsAssertion", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/integ-tests.DeployAssert", + "fqn": "@aws-cdk/integ-tests.LambdaInvokeFunction", "version": "0.0.0" } }, @@ -366,98 +364,98 @@ "id": "Staging", "path": "Bundling/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Staging", "constructInfo": { - "fqn": "@aws-cdk/core.AssetStaging", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "Role": { "id": "Role", "path": "Bundling/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Role", "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "Handler": { "id": "Handler", "path": "Bundling/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Handler", "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.Construct", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "AssetParameters": { "id": "AssetParameters", "path": "Bundling/DefaultTest/DeployAssert/AssetParameters", "children": { - "1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38b": { - "id": "1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38b", - "path": "Bundling/DefaultTest/DeployAssert/AssetParameters/1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38b", + "84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7": { + "id": "84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7", + "path": "Bundling/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7", "children": { "S3Bucket": { "id": "S3Bucket", - "path": "Bundling/DefaultTest/DeployAssert/AssetParameters/1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38b/S3Bucket", + "path": "Bundling/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/S3Bucket", "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "S3VersionKey": { "id": "S3VersionKey", - "path": "Bundling/DefaultTest/DeployAssert/AssetParameters/1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38b/S3VersionKey", + "path": "Bundling/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/S3VersionKey", "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "ArtifactHash": { "id": "ArtifactHash", - "path": "Bundling/DefaultTest/DeployAssert/AssetParameters/1bc7cf3a01a7153f942391263b3bac937812996cc28f9abaf83ffebbbe03e38b/ArtifactHash", + "path": "Bundling/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/ArtifactHash", "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.Construct", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.Construct", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.Stack", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.Construct", + "fqn": "@aws-cdk/integ-tests.IntegTestCase", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.Construct", + "fqn": "@aws-cdk/integ-tests.IntegTest", "version": "0.0.0" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.App", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda/test/integ.bundling.docker-opts.ts b/packages/@aws-cdk/aws-lambda/test/integ.bundling.docker-opts.ts index 80441cf6ab906..37d7b70dc1f55 100644 --- a/packages/@aws-cdk/aws-lambda/test/integ.bundling.docker-opts.ts +++ b/packages/@aws-cdk/aws-lambda/test/integ.bundling.docker-opts.ts @@ -1,4 +1,3 @@ -/// !cdk-integ pragma:disable-update-workflow import * as path from 'path'; import { App, Stack, StackProps } from '@aws-cdk/core'; import { IntegTest, ExpectedResult } from '@aws-cdk/integ-tests'; @@ -43,7 +42,7 @@ class TestStack extends Stack { const app = new App(); const stack = new TestStack(app, 'cdk-integ-lambda-bundling-docker-bundling-opts'); -const integ = new IntegTest(app, 'Bundling', { +const integ = new IntegTest(app, 'DockerOptsBundling', { testCases: [stack], stackUpdateWorkflow: false, }); @@ -54,4 +53,4 @@ const invoke = integ.assertions.invokeFunction({ invoke.expect(ExpectedResult.objectLike({ Payload: '200', })); -app.synth(); \ No newline at end of file +app.synth(); diff --git a/packages/@aws-cdk/aws-lambda/test/integ.bundling.ts b/packages/@aws-cdk/aws-lambda/test/integ.bundling.ts index 8549134ca9e5b..6e22153aff953 100644 --- a/packages/@aws-cdk/aws-lambda/test/integ.bundling.ts +++ b/packages/@aws-cdk/aws-lambda/test/integ.bundling.ts @@ -1,4 +1,3 @@ -/// !cdk-integ pragma:disable-update-workflow import * as path from 'path'; import { App, Stack, StackProps } from '@aws-cdk/core'; import { IntegTest, ExpectedResult } from '@aws-cdk/integ-tests'; @@ -53,4 +52,3 @@ const invoke = integ.assertions.invokeFunction({ invoke.expect(ExpectedResult.objectLike({ Payload: '200', })); -app.synth(); diff --git a/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/asset.374e4c6bf67290e7a1839e32e1c4ec413fe48477e9585dc2e042bc07509f7458.bundle/index.js b/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/asset.374e4c6bf67290e7a1839e32e1c4ec413fe48477e9585dc2e042bc07509f7458.bundle/index.js index 8bf779074d7d4..09ec17c1ae178 100644 --- a/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/asset.374e4c6bf67290e7a1839e32e1c4ec413fe48477e9585dc2e042bc07509f7458.bundle/index.js +++ b/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/asset.374e4c6bf67290e7a1839e32e1c4ec413fe48477e9585dc2e042bc07509f7458.bundle/index.js @@ -492,7 +492,7 @@ var AssertionHandler = class extends CustomResourceHandler { } else { result = { data: JSON.stringify({ - status: "pass" + status: "success" }) }; } diff --git a/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/asset.84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7.bundle/index.js b/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/asset.84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7.bundle/index.js new file mode 100644 index 0000000000000..ba956d47f51fe --- /dev/null +++ b/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/asset.84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7.bundle/index.js @@ -0,0 +1,612 @@ +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// lib/assertions/providers/lambda-handler/index.ts +var lambda_handler_exports = {}; +__export(lambda_handler_exports, { + handler: () => handler +}); +module.exports = __toCommonJS(lambda_handler_exports); + +// ../assertions/lib/matcher.ts +var Matcher = class { + static isMatcher(x) { + return x && x instanceof Matcher; + } +}; +var MatchResult = class { + constructor(target) { + this.failures = []; + this.captures = /* @__PURE__ */ new Map(); + this.finalized = false; + this.target = target; + } + push(matcher, path, message) { + return this.recordFailure({ matcher, path, message }); + } + recordFailure(failure) { + this.failures.push(failure); + return this; + } + hasFailed() { + return this.failures.length !== 0; + } + get failCount() { + return this.failures.length; + } + compose(id, inner) { + const innerF = inner.failures; + this.failures.push(...innerF.map((f) => { + return { path: [id, ...f.path], message: f.message, matcher: f.matcher }; + })); + inner.captures.forEach((vals, capture) => { + vals.forEach((value) => this.recordCapture({ capture, value })); + }); + return this; + } + finished() { + if (this.finalized) { + return this; + } + if (this.failCount === 0) { + this.captures.forEach((vals, cap) => cap._captured.push(...vals)); + } + this.finalized = true; + return this; + } + toHumanStrings() { + return this.failures.map((r) => { + const loc = r.path.length === 0 ? "" : ` at ${r.path.join("")}`; + return "" + r.message + loc + ` (using ${r.matcher.name} matcher)`; + }); + } + recordCapture(options) { + let values = this.captures.get(options.capture); + if (values === void 0) { + values = []; + } + values.push(options.value); + this.captures.set(options.capture, values); + } +}; + +// ../assertions/lib/private/matchers/absent.ts +var AbsentMatch = class extends Matcher { + constructor(name) { + super(); + this.name = name; + } + test(actual) { + const result = new MatchResult(actual); + if (actual !== void 0) { + result.recordFailure({ + matcher: this, + path: [], + message: `Received ${actual}, but key should be absent` + }); + } + return result; + } +}; + +// ../assertions/lib/private/type.ts +function getType(obj) { + return Array.isArray(obj) ? "array" : typeof obj; +} + +// ../assertions/lib/match.ts +var Match = class { + static absent() { + return new AbsentMatch("absent"); + } + static arrayWith(pattern) { + return new ArrayMatch("arrayWith", pattern); + } + static arrayEquals(pattern) { + return new ArrayMatch("arrayEquals", pattern, { subsequence: false }); + } + static exact(pattern) { + return new LiteralMatch("exact", pattern, { partialObjects: false }); + } + static objectLike(pattern) { + return new ObjectMatch("objectLike", pattern); + } + static objectEquals(pattern) { + return new ObjectMatch("objectEquals", pattern, { partial: false }); + } + static not(pattern) { + return new NotMatch("not", pattern); + } + static serializedJson(pattern) { + return new SerializedJson("serializedJson", pattern); + } + static anyValue() { + return new AnyMatch("anyValue"); + } + static stringLikeRegexp(pattern) { + return new StringLikeRegexpMatch("stringLikeRegexp", pattern); + } +}; +var LiteralMatch = class extends Matcher { + constructor(name, pattern, options = {}) { + super(); + this.name = name; + this.pattern = pattern; + this.partialObjects = options.partialObjects ?? false; + if (Matcher.isMatcher(this.pattern)) { + throw new Error("LiteralMatch cannot directly contain another matcher. Remove the top-level matcher or nest it more deeply."); + } + } + test(actual) { + if (Array.isArray(this.pattern)) { + return new ArrayMatch(this.name, this.pattern, { subsequence: false, partialObjects: this.partialObjects }).test(actual); + } + if (typeof this.pattern === "object") { + return new ObjectMatch(this.name, this.pattern, { partial: this.partialObjects }).test(actual); + } + const result = new MatchResult(actual); + if (typeof this.pattern !== typeof actual) { + result.recordFailure({ + matcher: this, + path: [], + message: `Expected type ${typeof this.pattern} but received ${getType(actual)}` + }); + return result; + } + if (actual !== this.pattern) { + result.recordFailure({ + matcher: this, + path: [], + message: `Expected ${this.pattern} but received ${actual}` + }); + } + return result; + } +}; +var ArrayMatch = class extends Matcher { + constructor(name, pattern, options = {}) { + super(); + this.name = name; + this.pattern = pattern; + this.subsequence = options.subsequence ?? true; + this.partialObjects = options.partialObjects ?? false; + } + test(actual) { + if (!Array.isArray(actual)) { + return new MatchResult(actual).recordFailure({ + matcher: this, + path: [], + message: `Expected type array but received ${getType(actual)}` + }); + } + if (!this.subsequence && this.pattern.length !== actual.length) { + return new MatchResult(actual).recordFailure({ + matcher: this, + path: [], + message: `Expected array of length ${this.pattern.length} but received ${actual.length}` + }); + } + let patternIdx = 0; + let actualIdx = 0; + const result = new MatchResult(actual); + while (patternIdx < this.pattern.length && actualIdx < actual.length) { + const patternElement = this.pattern[patternIdx]; + const matcher = Matcher.isMatcher(patternElement) ? patternElement : new LiteralMatch(this.name, patternElement, { partialObjects: this.partialObjects }); + const matcherName = matcher.name; + if (this.subsequence && (matcherName == "absent" || matcherName == "anyValue")) { + throw new Error(`The Matcher ${matcherName}() cannot be nested within arrayWith()`); + } + const innerResult = matcher.test(actual[actualIdx]); + if (!this.subsequence || !innerResult.hasFailed()) { + result.compose(`[${actualIdx}]`, innerResult); + patternIdx++; + actualIdx++; + } else { + actualIdx++; + } + } + for (; patternIdx < this.pattern.length; patternIdx++) { + const pattern = this.pattern[patternIdx]; + const element = Matcher.isMatcher(pattern) || typeof pattern === "object" ? " " : ` [${pattern}] `; + result.recordFailure({ + matcher: this, + path: [], + message: `Missing element${element}at pattern index ${patternIdx}` + }); + } + return result; + } +}; +var ObjectMatch = class extends Matcher { + constructor(name, pattern, options = {}) { + super(); + this.name = name; + this.pattern = pattern; + this.partial = options.partial ?? true; + } + test(actual) { + if (typeof actual !== "object" || Array.isArray(actual)) { + return new MatchResult(actual).recordFailure({ + matcher: this, + path: [], + message: `Expected type object but received ${getType(actual)}` + }); + } + const result = new MatchResult(actual); + if (!this.partial) { + for (const a of Object.keys(actual)) { + if (!(a in this.pattern)) { + result.recordFailure({ + matcher: this, + path: [`/${a}`], + message: "Unexpected key" + }); + } + } + } + for (const [patternKey, patternVal] of Object.entries(this.pattern)) { + if (!(patternKey in actual) && !(patternVal instanceof AbsentMatch)) { + result.recordFailure({ + matcher: this, + path: [`/${patternKey}`], + message: `Missing key '${patternKey}' among {${Object.keys(actual).join(",")}}` + }); + continue; + } + const matcher = Matcher.isMatcher(patternVal) ? patternVal : new LiteralMatch(this.name, patternVal, { partialObjects: this.partial }); + const inner = matcher.test(actual[patternKey]); + result.compose(`/${patternKey}`, inner); + } + return result; + } +}; +var SerializedJson = class extends Matcher { + constructor(name, pattern) { + super(); + this.name = name; + this.pattern = pattern; + } + test(actual) { + const result = new MatchResult(actual); + if (getType(actual) !== "string") { + result.recordFailure({ + matcher: this, + path: [], + message: `Expected JSON as a string but found ${getType(actual)}` + }); + return result; + } + let parsed; + try { + parsed = JSON.parse(actual); + } catch (err) { + if (err instanceof SyntaxError) { + result.recordFailure({ + matcher: this, + path: [], + message: `Invalid JSON string: ${actual}` + }); + return result; + } else { + throw err; + } + } + const matcher = Matcher.isMatcher(this.pattern) ? this.pattern : new LiteralMatch(this.name, this.pattern); + const innerResult = matcher.test(parsed); + result.compose(`(${this.name})`, innerResult); + return result; + } +}; +var NotMatch = class extends Matcher { + constructor(name, pattern) { + super(); + this.name = name; + this.pattern = pattern; + } + test(actual) { + const matcher = Matcher.isMatcher(this.pattern) ? this.pattern : new LiteralMatch(this.name, this.pattern); + const innerResult = matcher.test(actual); + const result = new MatchResult(actual); + if (innerResult.failCount === 0) { + result.recordFailure({ + matcher: this, + path: [], + message: `Found unexpected match: ${JSON.stringify(actual, void 0, 2)}` + }); + } + return result; + } +}; +var AnyMatch = class extends Matcher { + constructor(name) { + super(); + this.name = name; + } + test(actual) { + const result = new MatchResult(actual); + if (actual == null) { + result.recordFailure({ + matcher: this, + path: [], + message: "Expected a value but found none" + }); + } + return result; + } +}; +var StringLikeRegexpMatch = class extends Matcher { + constructor(name, pattern) { + super(); + this.name = name; + this.pattern = pattern; + } + test(actual) { + const result = new MatchResult(actual); + const regex = new RegExp(this.pattern, "gm"); + if (typeof actual !== "string") { + result.recordFailure({ + matcher: this, + path: [], + message: `Expected a string, but got '${typeof actual}'` + }); + } + if (!regex.test(actual)) { + result.recordFailure({ + matcher: this, + path: [], + message: `String '${actual}' did not match pattern '${this.pattern}'` + }); + } + return result; + } +}; + +// lib/assertions/providers/lambda-handler/base.ts +var https = __toESM(require("https")); +var url = __toESM(require("url")); +var CustomResourceHandler = class { + constructor(event, context) { + this.event = event; + this.context = context; + this.timedOut = false; + this.timeout = setTimeout(async () => { + await this.respond({ + status: "FAILED", + reason: "Lambda Function Timeout", + data: this.context.logStreamName + }); + this.timedOut = true; + }, context.getRemainingTimeInMillis() - 1200); + this.event = event; + this.physicalResourceId = extractPhysicalResourceId(event); + } + async handle() { + try { + console.log(`Event: ${JSON.stringify({ ...this.event, ResponseURL: "..." })}`); + const response = await this.processEvent(this.event.ResourceProperties); + console.log(`Event output : ${JSON.stringify(response)}`); + await this.respond({ + status: "SUCCESS", + reason: "OK", + data: response + }); + } catch (e) { + console.log(e); + await this.respond({ + status: "FAILED", + reason: e.message ?? "Internal Error" + }); + } finally { + clearTimeout(this.timeout); + } + } + respond(response) { + if (this.timedOut) { + return; + } + const cfResponse = { + Status: response.status, + Reason: response.reason, + PhysicalResourceId: this.physicalResourceId, + StackId: this.event.StackId, + RequestId: this.event.RequestId, + LogicalResourceId: this.event.LogicalResourceId, + NoEcho: false, + Data: response.data + }; + const responseBody = JSON.stringify(cfResponse); + console.log("Responding to CloudFormation", responseBody); + const parsedUrl = url.parse(this.event.ResponseURL); + const requestOptions = { + hostname: parsedUrl.hostname, + path: parsedUrl.path, + method: "PUT", + headers: { "content-type": "", "content-length": responseBody.length } + }; + return new Promise((resolve, reject) => { + try { + const request2 = https.request(requestOptions, resolve); + request2.on("error", reject); + request2.write(responseBody); + request2.end(); + } catch (e) { + reject(e); + } + }); + } +}; +function extractPhysicalResourceId(event) { + switch (event.RequestType) { + case "Create": + return event.LogicalResourceId; + case "Update": + case "Delete": + return event.PhysicalResourceId; + } +} + +// lib/assertions/providers/lambda-handler/assertion.ts +var AssertionHandler = class extends CustomResourceHandler { + async processEvent(request2) { + let actual = decodeCall(request2.actual); + const expected = decodeCall(request2.expected); + let result; + const matcher = new MatchCreator(expected).getMatcher(); + console.log(`Testing equality between ${JSON.stringify(request2.actual)} and ${JSON.stringify(request2.expected)}`); + const matchResult = matcher.test(actual); + matchResult.finished(); + if (matchResult.hasFailed()) { + result = { + data: JSON.stringify({ + status: "fail", + message: [ + ...matchResult.toHumanStrings(), + JSON.stringify(matchResult.target, void 0, 2) + ].join("\n") + }) + }; + if (request2.failDeployment) { + throw new Error(result.data); + } + } else { + result = { + data: JSON.stringify({ + status: "success" + }) + }; + } + return result; + } +}; +var MatchCreator = class { + constructor(obj) { + this.parsedObj = { + matcher: obj + }; + } + getMatcher() { + try { + const final = JSON.parse(JSON.stringify(this.parsedObj), function(_k, v) { + const nested = Object.keys(v)[0]; + switch (nested) { + case "$ArrayWith": + return Match.arrayWith(v[nested]); + case "$ObjectLike": + return Match.objectLike(v[nested]); + case "$StringLike": + return Match.stringLikeRegexp(v[nested]); + default: + return v; + } + }); + if (Matcher.isMatcher(final.matcher)) { + return final.matcher; + } + return Match.exact(final.matcher); + } catch { + return Match.exact(this.parsedObj.matcher); + } + } +}; +function decodeCall(call) { + if (!call) { + return void 0; + } + try { + const parsed = JSON.parse(call); + return parsed; + } catch (e) { + return call; + } +} + +// lib/assertions/providers/lambda-handler/utils.ts +function decode(object) { + return JSON.parse(JSON.stringify(object), (_k, v) => { + switch (v) { + case "TRUE:BOOLEAN": + return true; + case "FALSE:BOOLEAN": + return false; + default: + return v; + } + }); +} + +// lib/assertions/providers/lambda-handler/sdk.ts +function flatten(object) { + return Object.assign( + {}, + ...function _flatten(child, path = []) { + return [].concat(...Object.keys(child).map((key) => { + const childKey = Buffer.isBuffer(child[key]) ? child[key].toString("utf8") : child[key]; + return typeof childKey === "object" && childKey !== null ? _flatten(childKey, path.concat([key])) : { [path.concat([key]).join(".")]: childKey }; + })); + }(object) + ); +} +var AwsApiCallHandler = class extends CustomResourceHandler { + async processEvent(request2) { + const AWS = require("aws-sdk"); + console.log(`AWS SDK VERSION: ${AWS.VERSION}`); + const service = new AWS[request2.service](); + const response = await service[request2.api](request2.parameters && decode(request2.parameters)).promise(); + console.log(`SDK response received ${JSON.stringify(response)}`); + delete response.ResponseMetadata; + const respond = { + apiCallResponse: response + }; + const flatData = { + ...flatten(respond) + }; + return request2.flattenResponse === "true" ? flatData : respond; + } +}; + +// lib/assertions/providers/lambda-handler/types.ts +var ASSERT_RESOURCE_TYPE = "Custom::DeployAssert@AssertEquals"; +var SDK_RESOURCE_TYPE_PREFIX = "Custom::DeployAssert@SdkCall"; + +// lib/assertions/providers/lambda-handler/index.ts +async function handler(event, context) { + const provider = createResourceHandler(event, context); + await provider.handle(); +} +function createResourceHandler(event, context) { + if (event.ResourceType.startsWith(SDK_RESOURCE_TYPE_PREFIX)) { + return new AwsApiCallHandler(event, context); + } + switch (event.ResourceType) { + case ASSERT_RESOURCE_TYPE: + return new AssertionHandler(event, context); + default: + throw new Error(`Unsupported resource type "${event.ResourceType}`); + } +} +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + handler +}); diff --git a/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/cdk.out index 588d7b269d34f..8ecc185e9dbee 100644 --- a/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/cdk.out @@ -1 +1 @@ -{"version":"20.0.0"} \ No newline at end of file +{"version":"21.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/integ.json b/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/integ.json index cd779dff79bc4..f4bcd128b85cc 100644 --- a/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/integ.json +++ b/packages/@aws-cdk/aws-msk/test/cluster.integ.snapshot/integ.json @@ -1,11 +1,12 @@ { - "version": "20.0.0", + "version": "21.0.0", "testCases": { "MskLogging/DefaultTest": { "stacks": [ "aws-cdk-msk-integ" ], - "assertionStack": "MskLogging/DefaultTest/DeployAssert" + "assertionStack": "MskLogging/DefaultTest/DeployAssert", + "assertionStackName": "MskLoggingDefaultTestDeployAssertC2F074AF" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/put-events.integ.snapshot/PutEventsDefaultTestDeployAssert1A6BA3F3.template.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/put-events.integ.snapshot/PutEventsDefaultTestDeployAssert1A6BA3F3.template.json index f778c81df30ee..bce33613745d0 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/put-events.integ.snapshot/PutEventsDefaultTestDeployAssert1A6BA3F3.template.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/put-events.integ.snapshot/PutEventsDefaultTestDeployAssert1A6BA3F3.template.json @@ -17,7 +17,7 @@ } }, "flattenResponse": "true", - "salt": "1660753069000" + "salt": "1661796815777" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -78,7 +78,7 @@ "Runtime": "nodejs14.x", "Code": { "S3Bucket": { - "Ref": "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdS3BucketF94385B7" + "Ref": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3BucketA2BC9E80" }, "S3Key": { "Fn::Join": [ @@ -91,7 +91,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdS3VersionKey66DB0F9E" + "Ref": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3VersionKeyB8E92EFE" } ] } @@ -104,7 +104,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdS3VersionKey66DB0F9E" + "Ref": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3VersionKeyB8E92EFE" } ] } @@ -144,7 +144,7 @@ } }, "flattenResponse": "false", - "salt": "1660753069000" + "salt": "1661796815778" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" @@ -165,24 +165,24 @@ ] }, "expected": "{\"$ObjectLike\":{\"status\":\"SUCCEEDED\"}}", - "salt": "1660753069001" + "salt": "1661796815778" }, "UpdateReplacePolicy": "Delete", "DeletionPolicy": "Delete" } }, "Parameters": { - "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdS3BucketF94385B7": { + "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3BucketA2BC9E80": { "Type": "String", - "Description": "S3 bucket for asset \"0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd\"" + "Description": "S3 bucket for asset \"84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7\"" }, - "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdS3VersionKey66DB0F9E": { + "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3VersionKeyB8E92EFE": { "Type": "String", - "Description": "S3 key for asset version \"0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd\"" + "Description": "S3 key for asset version \"84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7\"" }, - "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdArtifactHash2AC894D9": { + "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7ArtifactHashB8137036": { "Type": "String", - "Description": "Artifact hash for asset \"0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd\"" + "Description": "Artifact hash for asset \"84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7\"" } }, "Outputs": { diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/put-events.integ.snapshot/asset.84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7.bundle/index.js b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/put-events.integ.snapshot/asset.84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7.bundle/index.js new file mode 100644 index 0000000000000..ba956d47f51fe --- /dev/null +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/put-events.integ.snapshot/asset.84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7.bundle/index.js @@ -0,0 +1,612 @@ +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// lib/assertions/providers/lambda-handler/index.ts +var lambda_handler_exports = {}; +__export(lambda_handler_exports, { + handler: () => handler +}); +module.exports = __toCommonJS(lambda_handler_exports); + +// ../assertions/lib/matcher.ts +var Matcher = class { + static isMatcher(x) { + return x && x instanceof Matcher; + } +}; +var MatchResult = class { + constructor(target) { + this.failures = []; + this.captures = /* @__PURE__ */ new Map(); + this.finalized = false; + this.target = target; + } + push(matcher, path, message) { + return this.recordFailure({ matcher, path, message }); + } + recordFailure(failure) { + this.failures.push(failure); + return this; + } + hasFailed() { + return this.failures.length !== 0; + } + get failCount() { + return this.failures.length; + } + compose(id, inner) { + const innerF = inner.failures; + this.failures.push(...innerF.map((f) => { + return { path: [id, ...f.path], message: f.message, matcher: f.matcher }; + })); + inner.captures.forEach((vals, capture) => { + vals.forEach((value) => this.recordCapture({ capture, value })); + }); + return this; + } + finished() { + if (this.finalized) { + return this; + } + if (this.failCount === 0) { + this.captures.forEach((vals, cap) => cap._captured.push(...vals)); + } + this.finalized = true; + return this; + } + toHumanStrings() { + return this.failures.map((r) => { + const loc = r.path.length === 0 ? "" : ` at ${r.path.join("")}`; + return "" + r.message + loc + ` (using ${r.matcher.name} matcher)`; + }); + } + recordCapture(options) { + let values = this.captures.get(options.capture); + if (values === void 0) { + values = []; + } + values.push(options.value); + this.captures.set(options.capture, values); + } +}; + +// ../assertions/lib/private/matchers/absent.ts +var AbsentMatch = class extends Matcher { + constructor(name) { + super(); + this.name = name; + } + test(actual) { + const result = new MatchResult(actual); + if (actual !== void 0) { + result.recordFailure({ + matcher: this, + path: [], + message: `Received ${actual}, but key should be absent` + }); + } + return result; + } +}; + +// ../assertions/lib/private/type.ts +function getType(obj) { + return Array.isArray(obj) ? "array" : typeof obj; +} + +// ../assertions/lib/match.ts +var Match = class { + static absent() { + return new AbsentMatch("absent"); + } + static arrayWith(pattern) { + return new ArrayMatch("arrayWith", pattern); + } + static arrayEquals(pattern) { + return new ArrayMatch("arrayEquals", pattern, { subsequence: false }); + } + static exact(pattern) { + return new LiteralMatch("exact", pattern, { partialObjects: false }); + } + static objectLike(pattern) { + return new ObjectMatch("objectLike", pattern); + } + static objectEquals(pattern) { + return new ObjectMatch("objectEquals", pattern, { partial: false }); + } + static not(pattern) { + return new NotMatch("not", pattern); + } + static serializedJson(pattern) { + return new SerializedJson("serializedJson", pattern); + } + static anyValue() { + return new AnyMatch("anyValue"); + } + static stringLikeRegexp(pattern) { + return new StringLikeRegexpMatch("stringLikeRegexp", pattern); + } +}; +var LiteralMatch = class extends Matcher { + constructor(name, pattern, options = {}) { + super(); + this.name = name; + this.pattern = pattern; + this.partialObjects = options.partialObjects ?? false; + if (Matcher.isMatcher(this.pattern)) { + throw new Error("LiteralMatch cannot directly contain another matcher. Remove the top-level matcher or nest it more deeply."); + } + } + test(actual) { + if (Array.isArray(this.pattern)) { + return new ArrayMatch(this.name, this.pattern, { subsequence: false, partialObjects: this.partialObjects }).test(actual); + } + if (typeof this.pattern === "object") { + return new ObjectMatch(this.name, this.pattern, { partial: this.partialObjects }).test(actual); + } + const result = new MatchResult(actual); + if (typeof this.pattern !== typeof actual) { + result.recordFailure({ + matcher: this, + path: [], + message: `Expected type ${typeof this.pattern} but received ${getType(actual)}` + }); + return result; + } + if (actual !== this.pattern) { + result.recordFailure({ + matcher: this, + path: [], + message: `Expected ${this.pattern} but received ${actual}` + }); + } + return result; + } +}; +var ArrayMatch = class extends Matcher { + constructor(name, pattern, options = {}) { + super(); + this.name = name; + this.pattern = pattern; + this.subsequence = options.subsequence ?? true; + this.partialObjects = options.partialObjects ?? false; + } + test(actual) { + if (!Array.isArray(actual)) { + return new MatchResult(actual).recordFailure({ + matcher: this, + path: [], + message: `Expected type array but received ${getType(actual)}` + }); + } + if (!this.subsequence && this.pattern.length !== actual.length) { + return new MatchResult(actual).recordFailure({ + matcher: this, + path: [], + message: `Expected array of length ${this.pattern.length} but received ${actual.length}` + }); + } + let patternIdx = 0; + let actualIdx = 0; + const result = new MatchResult(actual); + while (patternIdx < this.pattern.length && actualIdx < actual.length) { + const patternElement = this.pattern[patternIdx]; + const matcher = Matcher.isMatcher(patternElement) ? patternElement : new LiteralMatch(this.name, patternElement, { partialObjects: this.partialObjects }); + const matcherName = matcher.name; + if (this.subsequence && (matcherName == "absent" || matcherName == "anyValue")) { + throw new Error(`The Matcher ${matcherName}() cannot be nested within arrayWith()`); + } + const innerResult = matcher.test(actual[actualIdx]); + if (!this.subsequence || !innerResult.hasFailed()) { + result.compose(`[${actualIdx}]`, innerResult); + patternIdx++; + actualIdx++; + } else { + actualIdx++; + } + } + for (; patternIdx < this.pattern.length; patternIdx++) { + const pattern = this.pattern[patternIdx]; + const element = Matcher.isMatcher(pattern) || typeof pattern === "object" ? " " : ` [${pattern}] `; + result.recordFailure({ + matcher: this, + path: [], + message: `Missing element${element}at pattern index ${patternIdx}` + }); + } + return result; + } +}; +var ObjectMatch = class extends Matcher { + constructor(name, pattern, options = {}) { + super(); + this.name = name; + this.pattern = pattern; + this.partial = options.partial ?? true; + } + test(actual) { + if (typeof actual !== "object" || Array.isArray(actual)) { + return new MatchResult(actual).recordFailure({ + matcher: this, + path: [], + message: `Expected type object but received ${getType(actual)}` + }); + } + const result = new MatchResult(actual); + if (!this.partial) { + for (const a of Object.keys(actual)) { + if (!(a in this.pattern)) { + result.recordFailure({ + matcher: this, + path: [`/${a}`], + message: "Unexpected key" + }); + } + } + } + for (const [patternKey, patternVal] of Object.entries(this.pattern)) { + if (!(patternKey in actual) && !(patternVal instanceof AbsentMatch)) { + result.recordFailure({ + matcher: this, + path: [`/${patternKey}`], + message: `Missing key '${patternKey}' among {${Object.keys(actual).join(",")}}` + }); + continue; + } + const matcher = Matcher.isMatcher(patternVal) ? patternVal : new LiteralMatch(this.name, patternVal, { partialObjects: this.partial }); + const inner = matcher.test(actual[patternKey]); + result.compose(`/${patternKey}`, inner); + } + return result; + } +}; +var SerializedJson = class extends Matcher { + constructor(name, pattern) { + super(); + this.name = name; + this.pattern = pattern; + } + test(actual) { + const result = new MatchResult(actual); + if (getType(actual) !== "string") { + result.recordFailure({ + matcher: this, + path: [], + message: `Expected JSON as a string but found ${getType(actual)}` + }); + return result; + } + let parsed; + try { + parsed = JSON.parse(actual); + } catch (err) { + if (err instanceof SyntaxError) { + result.recordFailure({ + matcher: this, + path: [], + message: `Invalid JSON string: ${actual}` + }); + return result; + } else { + throw err; + } + } + const matcher = Matcher.isMatcher(this.pattern) ? this.pattern : new LiteralMatch(this.name, this.pattern); + const innerResult = matcher.test(parsed); + result.compose(`(${this.name})`, innerResult); + return result; + } +}; +var NotMatch = class extends Matcher { + constructor(name, pattern) { + super(); + this.name = name; + this.pattern = pattern; + } + test(actual) { + const matcher = Matcher.isMatcher(this.pattern) ? this.pattern : new LiteralMatch(this.name, this.pattern); + const innerResult = matcher.test(actual); + const result = new MatchResult(actual); + if (innerResult.failCount === 0) { + result.recordFailure({ + matcher: this, + path: [], + message: `Found unexpected match: ${JSON.stringify(actual, void 0, 2)}` + }); + } + return result; + } +}; +var AnyMatch = class extends Matcher { + constructor(name) { + super(); + this.name = name; + } + test(actual) { + const result = new MatchResult(actual); + if (actual == null) { + result.recordFailure({ + matcher: this, + path: [], + message: "Expected a value but found none" + }); + } + return result; + } +}; +var StringLikeRegexpMatch = class extends Matcher { + constructor(name, pattern) { + super(); + this.name = name; + this.pattern = pattern; + } + test(actual) { + const result = new MatchResult(actual); + const regex = new RegExp(this.pattern, "gm"); + if (typeof actual !== "string") { + result.recordFailure({ + matcher: this, + path: [], + message: `Expected a string, but got '${typeof actual}'` + }); + } + if (!regex.test(actual)) { + result.recordFailure({ + matcher: this, + path: [], + message: `String '${actual}' did not match pattern '${this.pattern}'` + }); + } + return result; + } +}; + +// lib/assertions/providers/lambda-handler/base.ts +var https = __toESM(require("https")); +var url = __toESM(require("url")); +var CustomResourceHandler = class { + constructor(event, context) { + this.event = event; + this.context = context; + this.timedOut = false; + this.timeout = setTimeout(async () => { + await this.respond({ + status: "FAILED", + reason: "Lambda Function Timeout", + data: this.context.logStreamName + }); + this.timedOut = true; + }, context.getRemainingTimeInMillis() - 1200); + this.event = event; + this.physicalResourceId = extractPhysicalResourceId(event); + } + async handle() { + try { + console.log(`Event: ${JSON.stringify({ ...this.event, ResponseURL: "..." })}`); + const response = await this.processEvent(this.event.ResourceProperties); + console.log(`Event output : ${JSON.stringify(response)}`); + await this.respond({ + status: "SUCCESS", + reason: "OK", + data: response + }); + } catch (e) { + console.log(e); + await this.respond({ + status: "FAILED", + reason: e.message ?? "Internal Error" + }); + } finally { + clearTimeout(this.timeout); + } + } + respond(response) { + if (this.timedOut) { + return; + } + const cfResponse = { + Status: response.status, + Reason: response.reason, + PhysicalResourceId: this.physicalResourceId, + StackId: this.event.StackId, + RequestId: this.event.RequestId, + LogicalResourceId: this.event.LogicalResourceId, + NoEcho: false, + Data: response.data + }; + const responseBody = JSON.stringify(cfResponse); + console.log("Responding to CloudFormation", responseBody); + const parsedUrl = url.parse(this.event.ResponseURL); + const requestOptions = { + hostname: parsedUrl.hostname, + path: parsedUrl.path, + method: "PUT", + headers: { "content-type": "", "content-length": responseBody.length } + }; + return new Promise((resolve, reject) => { + try { + const request2 = https.request(requestOptions, resolve); + request2.on("error", reject); + request2.write(responseBody); + request2.end(); + } catch (e) { + reject(e); + } + }); + } +}; +function extractPhysicalResourceId(event) { + switch (event.RequestType) { + case "Create": + return event.LogicalResourceId; + case "Update": + case "Delete": + return event.PhysicalResourceId; + } +} + +// lib/assertions/providers/lambda-handler/assertion.ts +var AssertionHandler = class extends CustomResourceHandler { + async processEvent(request2) { + let actual = decodeCall(request2.actual); + const expected = decodeCall(request2.expected); + let result; + const matcher = new MatchCreator(expected).getMatcher(); + console.log(`Testing equality between ${JSON.stringify(request2.actual)} and ${JSON.stringify(request2.expected)}`); + const matchResult = matcher.test(actual); + matchResult.finished(); + if (matchResult.hasFailed()) { + result = { + data: JSON.stringify({ + status: "fail", + message: [ + ...matchResult.toHumanStrings(), + JSON.stringify(matchResult.target, void 0, 2) + ].join("\n") + }) + }; + if (request2.failDeployment) { + throw new Error(result.data); + } + } else { + result = { + data: JSON.stringify({ + status: "success" + }) + }; + } + return result; + } +}; +var MatchCreator = class { + constructor(obj) { + this.parsedObj = { + matcher: obj + }; + } + getMatcher() { + try { + const final = JSON.parse(JSON.stringify(this.parsedObj), function(_k, v) { + const nested = Object.keys(v)[0]; + switch (nested) { + case "$ArrayWith": + return Match.arrayWith(v[nested]); + case "$ObjectLike": + return Match.objectLike(v[nested]); + case "$StringLike": + return Match.stringLikeRegexp(v[nested]); + default: + return v; + } + }); + if (Matcher.isMatcher(final.matcher)) { + return final.matcher; + } + return Match.exact(final.matcher); + } catch { + return Match.exact(this.parsedObj.matcher); + } + } +}; +function decodeCall(call) { + if (!call) { + return void 0; + } + try { + const parsed = JSON.parse(call); + return parsed; + } catch (e) { + return call; + } +} + +// lib/assertions/providers/lambda-handler/utils.ts +function decode(object) { + return JSON.parse(JSON.stringify(object), (_k, v) => { + switch (v) { + case "TRUE:BOOLEAN": + return true; + case "FALSE:BOOLEAN": + return false; + default: + return v; + } + }); +} + +// lib/assertions/providers/lambda-handler/sdk.ts +function flatten(object) { + return Object.assign( + {}, + ...function _flatten(child, path = []) { + return [].concat(...Object.keys(child).map((key) => { + const childKey = Buffer.isBuffer(child[key]) ? child[key].toString("utf8") : child[key]; + return typeof childKey === "object" && childKey !== null ? _flatten(childKey, path.concat([key])) : { [path.concat([key]).join(".")]: childKey }; + })); + }(object) + ); +} +var AwsApiCallHandler = class extends CustomResourceHandler { + async processEvent(request2) { + const AWS = require("aws-sdk"); + console.log(`AWS SDK VERSION: ${AWS.VERSION}`); + const service = new AWS[request2.service](); + const response = await service[request2.api](request2.parameters && decode(request2.parameters)).promise(); + console.log(`SDK response received ${JSON.stringify(response)}`); + delete response.ResponseMetadata; + const respond = { + apiCallResponse: response + }; + const flatData = { + ...flatten(respond) + }; + return request2.flattenResponse === "true" ? flatData : respond; + } +}; + +// lib/assertions/providers/lambda-handler/types.ts +var ASSERT_RESOURCE_TYPE = "Custom::DeployAssert@AssertEquals"; +var SDK_RESOURCE_TYPE_PREFIX = "Custom::DeployAssert@SdkCall"; + +// lib/assertions/providers/lambda-handler/index.ts +async function handler(event, context) { + const provider = createResourceHandler(event, context); + await provider.handle(); +} +function createResourceHandler(event, context) { + if (event.ResourceType.startsWith(SDK_RESOURCE_TYPE_PREFIX)) { + return new AwsApiCallHandler(event, context); + } + switch (event.ResourceType) { + case ASSERT_RESOURCE_TYPE: + return new AssertionHandler(event, context); + default: + throw new Error(`Unsupported resource type "${event.ResourceType}`); + } +} +// Annotate the CommonJS export names for ESM import in node: +0 && (module.exports = { + handler +}); diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/put-events.integ.snapshot/cdk.out b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/put-events.integ.snapshot/cdk.out index 588d7b269d34f..8ecc185e9dbee 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/put-events.integ.snapshot/cdk.out +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/put-events.integ.snapshot/cdk.out @@ -1 +1 @@ -{"version":"20.0.0"} \ No newline at end of file +{"version":"21.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/put-events.integ.snapshot/integ.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/put-events.integ.snapshot/integ.json index f017363e897e9..8bc3eb27a6a40 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/put-events.integ.snapshot/integ.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/put-events.integ.snapshot/integ.json @@ -1,11 +1,12 @@ { - "version": "20.0.0", + "version": "21.0.0", "testCases": { "PutEvents/DefaultTest": { "stacks": [ "aws-stepfunctions-tasks-eventbridge-put-events-integ" ], - "assertionStack": "PutEvents/DefaultTest/DeployAssert" + "assertionStack": "PutEvents/DefaultTest/DeployAssert", + "assertionStackName": "PutEventsDefaultTestDeployAssert1A6BA3F3" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/put-events.integ.snapshot/manifest.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/put-events.integ.snapshot/manifest.json index 1e8a9d29e9571..8b86f822d7770 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/put-events.integ.snapshot/manifest.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/put-events.integ.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "20.0.0", + "version": "21.0.0", "artifacts": { "Tree": { "type": "cdk:tree", @@ -69,13 +69,13 @@ { "type": "aws:cdk:asset", "data": { - "path": "asset.0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd.bundle", - "id": "0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd", + "path": "asset.84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7.bundle", + "id": "84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7", "packaging": "zip", - "sourceHash": "0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd", - "s3BucketParameter": "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdS3BucketF94385B7", - "s3KeyParameter": "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdS3VersionKey66DB0F9E", - "artifactHashParameter": "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdArtifactHash2AC894D9" + "sourceHash": "84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7", + "s3BucketParameter": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3BucketA2BC9E80", + "s3KeyParameter": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3VersionKeyB8E92EFE", + "artifactHashParameter": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7ArtifactHashB8137036" } } ], @@ -97,22 +97,22 @@ "data": "SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F" } ], - "/PutEvents/DefaultTest/DeployAssert/AssetParameters/0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd/S3Bucket": [ + "/PutEvents/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/S3Bucket": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdS3BucketF94385B7" + "data": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3BucketA2BC9E80" } ], - "/PutEvents/DefaultTest/DeployAssert/AssetParameters/0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd/S3VersionKey": [ + "/PutEvents/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/S3VersionKey": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdS3VersionKey66DB0F9E" + "data": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7S3VersionKeyB8E92EFE" } ], - "/PutEvents/DefaultTest/DeployAssert/AssetParameters/0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd/ArtifactHash": [ + "/PutEvents/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/ArtifactHash": [ { "type": "aws:cdk:logicalId", - "data": "AssetParameters0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbdArtifactHash2AC894D9" + "data": "AssetParameters84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7ArtifactHashB8137036" } ], "/PutEvents/DefaultTest/DeployAssert/AwsApiCallStepFunctionsdescribeExecution/Default/Default": [ diff --git a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/put-events.integ.snapshot/tree.json b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/put-events.integ.snapshot/tree.json index 535dc2b5a827f..ceb519d0a082e 100644 --- a/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/put-events.integ.snapshot/tree.json +++ b/packages/@aws-cdk/aws-stepfunctions-tasks/test/eventbridge/put-events.integ.snapshot/tree.json @@ -9,7 +9,7 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.71" + "version": "10.1.85" } }, "aws-stepfunctions-tasks-eventbridge-put-events-integ": { @@ -209,8 +209,8 @@ "id": "Service-principalMap", "path": "aws-stepfunctions-tasks-eventbridge-put-events-integ/Service-principalMap", "constructInfo": { - "fqn": "@aws-cdk/core.CfnMapping", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "Exports": { @@ -221,20 +221,20 @@ "id": "Output{\"Ref\":\"StateMachine2E01A3A5\"}", "path": "aws-stepfunctions-tasks-eventbridge-put-events-integ/Exports/Output{\"Ref\":\"StateMachine2E01A3A5\"}", "constructInfo": { - "fqn": "@aws-cdk/core.CfnOutput", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.71" + "version": "10.1.85" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.Stack", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "PutEvents": { @@ -250,7 +250,7 @@ "path": "PutEvents/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.71" + "version": "10.1.85" } }, "DeployAssert": { @@ -270,7 +270,7 @@ "path": "PutEvents/DefaultTest/DeployAssert/AwsApiCallStepFunctionsstartExecution/SdkProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.71" + "version": "10.1.85" } } }, @@ -287,14 +287,14 @@ "id": "Default", "path": "PutEvents/DefaultTest/DeployAssert/AwsApiCallStepFunctionsstartExecution/Default/Default", "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.CustomResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, @@ -311,74 +311,74 @@ "id": "Staging", "path": "PutEvents/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Staging", "constructInfo": { - "fqn": "@aws-cdk/core.AssetStaging", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "Role": { "id": "Role", "path": "PutEvents/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Role", "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "Handler": { "id": "Handler", "path": "PutEvents/DefaultTest/DeployAssert/SingletonFunction1488541a7b23466481b69b4408076b81/Handler", "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.71" + "version": "10.1.85" } }, "AssetParameters": { "id": "AssetParameters", "path": "PutEvents/DefaultTest/DeployAssert/AssetParameters", "children": { - "0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd": { - "id": "0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd", - "path": "PutEvents/DefaultTest/DeployAssert/AssetParameters/0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd", + "84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7": { + "id": "84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7", + "path": "PutEvents/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7", "children": { "S3Bucket": { "id": "S3Bucket", - "path": "PutEvents/DefaultTest/DeployAssert/AssetParameters/0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd/S3Bucket", + "path": "PutEvents/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/S3Bucket", "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "S3VersionKey": { "id": "S3VersionKey", - "path": "PutEvents/DefaultTest/DeployAssert/AssetParameters/0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd/S3VersionKey", + "path": "PutEvents/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/S3VersionKey", "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "ArtifactHash": { "id": "ArtifactHash", - "path": "PutEvents/DefaultTest/DeployAssert/AssetParameters/0d8d96305807ac805d23c6d7b279eef238715605efad63c839ad1e7e8236bdbd/ArtifactHash", + "path": "PutEvents/DefaultTest/DeployAssert/AssetParameters/84802aa01d2d2c9e7d8d69705ee832c97f1ebad2d73c72be5c32d53f16cf90a7/ArtifactHash", "constructInfo": { - "fqn": "@aws-cdk/core.CfnParameter", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.71" + "version": "10.1.85" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.71" + "version": "10.1.85" } }, "AwsApiCallStepFunctionsdescribeExecution": { @@ -394,7 +394,7 @@ "path": "PutEvents/DefaultTest/DeployAssert/AwsApiCallStepFunctionsdescribeExecution/SdkProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.71" + "version": "10.1.85" } } }, @@ -411,14 +411,14 @@ "id": "Default", "path": "PutEvents/DefaultTest/DeployAssert/AwsApiCallStepFunctionsdescribeExecution/Default/Default", "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.CustomResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "AssertEqualsStepFunctionsdescribeExecution": { @@ -434,7 +434,7 @@ "path": "PutEvents/DefaultTest/DeployAssert/AwsApiCallStepFunctionsdescribeExecution/AssertEqualsStepFunctionsdescribeExecution/AssertionProvider/AssertionsProvider", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.1.71" + "version": "10.1.85" } } }, @@ -451,22 +451,22 @@ "id": "Default", "path": "PutEvents/DefaultTest/DeployAssert/AwsApiCallStepFunctionsdescribeExecution/AssertEqualsStepFunctionsdescribeExecution/Default/Default", "constructInfo": { - "fqn": "@aws-cdk/core.CfnResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, "constructInfo": { - "fqn": "@aws-cdk/core.CustomResource", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } }, "AssertionResults": { "id": "AssertionResults", "path": "PutEvents/DefaultTest/DeployAssert/AwsApiCallStepFunctionsdescribeExecution/AssertEqualsStepFunctionsdescribeExecution/AssertionResults", "constructInfo": { - "fqn": "@aws-cdk/core.CfnOutput", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, @@ -483,8 +483,8 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/core.Stack", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } }, @@ -501,8 +501,8 @@ } }, "constructInfo": { - "fqn": "@aws-cdk/core.App", - "version": "0.0.0" + "fqn": "constructs.Construct", + "version": "10.1.85" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/cloud-assembly-schema/lib/integ-tests/test-case.ts b/packages/@aws-cdk/cloud-assembly-schema/lib/integ-tests/test-case.ts index c3de8c8711853..6878f9da2563c 100644 --- a/packages/@aws-cdk/cloud-assembly-schema/lib/integ-tests/test-case.ts +++ b/packages/@aws-cdk/cloud-assembly-schema/lib/integ-tests/test-case.ts @@ -75,11 +75,19 @@ export interface TestCase extends TestOptions { readonly stacks: string[]; /** - * The name of the stack that contains assertions + * The node id of the stack that contains assertions. + * This is the value that can be used to deploy the stack with the CDK CLI * * @default - no assertion stack */ readonly assertionStack?: string; + + /** + * The name of the stack that contains assertions + * + * @default - no assertion stack + */ + readonly assertionStackName?: string; } /** diff --git a/packages/@aws-cdk/cloud-assembly-schema/schema/cloud-assembly.schema.json b/packages/@aws-cdk/cloud-assembly-schema/schema/cloud-assembly.schema.json index 7f877222e4563..506e0992c7259 100644 --- a/packages/@aws-cdk/cloud-assembly-schema/schema/cloud-assembly.schema.json +++ b/packages/@aws-cdk/cloud-assembly-schema/schema/cloud-assembly.schema.json @@ -639,7 +639,7 @@ } }, "returnAsymmetricSubnets": { - "description": "Whether to populate the subnetGroups field of the{@linkVpcContextResponse},\nwhich contains potentially asymmetric subnet groups.", + "description": "Whether to populate the subnetGroups field of the {@link VpcContextResponse},\nwhich contains potentially asymmetric subnet groups.", "default": false, "type": "boolean" }, diff --git a/packages/@aws-cdk/cloud-assembly-schema/schema/cloud-assembly.version.json b/packages/@aws-cdk/cloud-assembly-schema/schema/cloud-assembly.version.json index 588d7b269d34f..8ecc185e9dbee 100644 --- a/packages/@aws-cdk/cloud-assembly-schema/schema/cloud-assembly.version.json +++ b/packages/@aws-cdk/cloud-assembly-schema/schema/cloud-assembly.version.json @@ -1 +1 @@ -{"version":"20.0.0"} \ No newline at end of file +{"version":"21.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk/cloud-assembly-schema/schema/integ.schema.json b/packages/@aws-cdk/cloud-assembly-schema/schema/integ.schema.json index f18827244648c..a098e4d72a134 100644 --- a/packages/@aws-cdk/cloud-assembly-schema/schema/integ.schema.json +++ b/packages/@aws-cdk/cloud-assembly-schema/schema/integ.schema.json @@ -46,6 +46,10 @@ } }, "assertionStack": { + "description": "The node id of the stack that contains assertions.\nThis is the value that can be used to deploy the stack with the CDK CLI (Default - no assertion stack)", + "type": "string" + }, + "assertionStackName": { "description": "The name of the stack that contains assertions (Default - no assertion stack)", "type": "string" }, diff --git a/packages/@aws-cdk/integ-runner/lib/runner/integ-test-runner.ts b/packages/@aws-cdk/integ-runner/lib/runner/integ-test-runner.ts index ce2a40e6e5e6b..2845680063439 100644 --- a/packages/@aws-cdk/integ-runner/lib/runner/integ-test-runner.ts +++ b/packages/@aws-cdk/integ-runner/lib/runner/integ-test-runner.ts @@ -184,9 +184,9 @@ export class IntegTestRunner extends IntegRunner { output: path.relative(this.directory, this.cdkOutDir), }); } - // only create the snapshot if there are no assertion assertion results + // only create the snapshot if there are no failed assertion results // (i.e. no failures) - if (!assertionResults) { + if (!assertionResults || !Object.values(assertionResults).some(result => result.status === 'fail')) { this.createSnapshot(); } } catch (e) { @@ -300,9 +300,10 @@ export class IntegTestRunner extends IntegRunner { }); } - if (actualTestCase.assertionStack) { + if (actualTestCase.assertionStack && actualTestCase.assertionStackName) { return this.processAssertionResults( path.join(this.cdkOutDir, 'assertion-results.json'), + actualTestCase.assertionStackName, actualTestCase.assertionStack, ); } @@ -319,17 +320,17 @@ export class IntegTestRunner extends IntegRunner { * Process the outputsFile which contains the assertions results as stack * outputs */ - private processAssertionResults(file: string, assertionStackId: string): AssertionResults | undefined { + private processAssertionResults(file: string, assertionStackName: string, assertionStackId: string): AssertionResults | undefined { const results: AssertionResults = {}; if (fs.existsSync(file)) { try { const outputs: { [key: string]: { [key: string]: string } } = fs.readJSONSync(file); - if (assertionStackId in outputs) { - for (const [assertionId, result] of Object.entries(outputs[assertionStackId])) { + if (assertionStackName in outputs) { + for (const [assertionId, result] of Object.entries(outputs[assertionStackName])) { if (assertionId.startsWith('AssertionResults')) { const assertionResult: AssertionResult = JSON.parse(result.replace(/\n/g, '\\n')); - if (assertionResult.status === 'fail') { + if (assertionResult.status === 'fail' || assertionResult.status === 'success') { results[assertionId] = assertionResult; } } diff --git a/packages/@aws-cdk/integ-runner/lib/workers/common.ts b/packages/@aws-cdk/integ-runner/lib/workers/common.ts index 739dc55f2ac5a..7f49cb73b864c 100644 --- a/packages/@aws-cdk/integ-runner/lib/workers/common.ts +++ b/packages/@aws-cdk/integ-runner/lib/workers/common.ts @@ -256,8 +256,8 @@ export function printSummary(total: number, failed: number): void { */ export function formatAssertionResults(results: AssertionResults): string { return Object.entries(results) - .map(([id, result]) => format('%s\n%s', id, result.message)) - .join('\n'); + .map(([id, result]) => format('%s%s', id, result.status === 'success' ? ` - ${result.status}` : `\n${result.message}`)) + .join('\n '); } /** @@ -269,7 +269,7 @@ export function printResults(diagnostic: Diagnostic): void { logger.success(' UNCHANGED %s %s', diagnostic.testName, chalk.gray(`${diagnostic.duration}s`)); break; case DiagnosticReason.TEST_SUCCESS: - logger.success(' SUCCESS %s %s', diagnostic.testName, chalk.gray(`${diagnostic.duration}s`)); + logger.success(' SUCCESS %s %s\n ', diagnostic.testName, chalk.gray(`${diagnostic.duration}s`), diagnostic.message); break; case DiagnosticReason.NO_SNAPSHOT: logger.error(' NEW %s %s', diagnostic.testName, chalk.gray(`${diagnostic.duration}s`)); @@ -301,4 +301,4 @@ export function printLaggards(testNames: Set) { ]; logger.print(chalk.grey(parts.filter(x => x).join(' '))); -} \ No newline at end of file +} diff --git a/packages/@aws-cdk/integ-runner/lib/workers/extract/extract_worker.ts b/packages/@aws-cdk/integ-runner/lib/workers/extract/extract_worker.ts index 35ed78d91c68b..a8166680fb7ba 100644 --- a/packages/@aws-cdk/integ-runner/lib/workers/extract/extract_worker.ts +++ b/packages/@aws-cdk/integ-runner/lib/workers/extract/extract_worker.ts @@ -44,7 +44,7 @@ export function integTestWorker(request: IntegTestBatchRequest): IntegTestWorker updateWorkflow: request.updateWorkflow, verbosity, }); - if (results) { + if (results && Object.values(results).some(result => result.status === 'fail')) { failures.push(testInfo); workerpool.workerEmit({ reason: DiagnosticReason.ASSERTION_FAILED, @@ -56,7 +56,7 @@ export function integTestWorker(request: IntegTestBatchRequest): IntegTestWorker workerpool.workerEmit({ reason: DiagnosticReason.TEST_SUCCESS, testName: `${runner.testName}-${testCaseName}`, - message: 'Success', + message: results ? formatAssertionResults(results) : 'NO ASSERTIONS', duration: (Date.now() - start) / 1000, }); } diff --git a/packages/@aws-cdk/integ-tests/lib/assertions/providers/lambda-handler/assertion.ts b/packages/@aws-cdk/integ-tests/lib/assertions/providers/lambda-handler/assertion.ts index fdb7bb04b7bdd..b8fba80266edb 100644 --- a/packages/@aws-cdk/integ-tests/lib/assertions/providers/lambda-handler/assertion.ts +++ b/packages/@aws-cdk/integ-tests/lib/assertions/providers/lambda-handler/assertion.ts @@ -30,7 +30,7 @@ export class AssertionHandler extends CustomResourceHandler s.node.path), }; } diff --git a/packages/@aws-cdk/integ-tests/test/assertions/providers/lambda-handler/assertion.test.ts b/packages/@aws-cdk/integ-tests/test/assertions/providers/lambda-handler/assertion.test.ts index 05740c33cc09b..0abda7d477de7 100644 --- a/packages/@aws-cdk/integ-tests/test/assertions/providers/lambda-handler/assertion.test.ts +++ b/packages/@aws-cdk/integ-tests/test/assertions/providers/lambda-handler/assertion.test.ts @@ -50,7 +50,7 @@ describe('AssertionHandler', () => { const response: AssertionResult = await handler.processEvent(request); // THEN - expect(response.data).toEqual('{"status":"pass"}'); + expect(response.data).toEqual('{"status":"success"}'); }); test('fail', async () => { @@ -95,7 +95,7 @@ describe('AssertionHandler', () => { const response: AssertionResult = await handler.processEvent(request); // THEN - expect(response.data).toEqual('{"status":"pass"}'); + expect(response.data).toEqual('{"status":"success"}'); }); test('fail', async () => { @@ -159,7 +159,7 @@ describe('AssertionHandler', () => { const response: AssertionResult = await handler.processEvent(request); // THEN - expect(response.data).toEqual('{"status":"pass"}'); + expect(response.data).toEqual('{"status":"success"}'); }); test('fail', async () => { @@ -209,7 +209,7 @@ describe('AssertionHandler', () => { const response: AssertionResult = await handler.processEvent(request); // THEN - expect(response.data).toEqual('{"status":"pass"}'); + expect(response.data).toEqual('{"status":"success"}'); }); test('string equals pass', async () => { @@ -224,7 +224,7 @@ describe('AssertionHandler', () => { const response: AssertionResult = await handler.processEvent(request); // THEN - expect(response.data).toEqual('{"status":"pass"}'); + expect(response.data).toEqual('{"status":"success"}'); }); test('fail', async () => { diff --git a/packages/@aws-cdk/integ-tests/test/manifest-synthesizer.test.ts b/packages/@aws-cdk/integ-tests/test/manifest-synthesizer.test.ts index 6d69140cd47e9..7c448b7467a52 100644 --- a/packages/@aws-cdk/integ-tests/test/manifest-synthesizer.test.ts +++ b/packages/@aws-cdk/integ-tests/test/manifest-synthesizer.test.ts @@ -45,10 +45,12 @@ describe(IntegManifestSynthesizer, () => { testCases: { ['stack/case1']: { assertionStack: 'stack/case1/DeployAssert', + assertionStackName: 'stackcase1DeployAssert491B3C7C', stacks: ['stack-under-test-1'], }, ['stack/case2']: { assertionStack: 'stack/case2/DeployAssert', + assertionStackName: 'stackcase2DeployAssert3B5E6392', stacks: ['stack-under-test-2'], }, }, @@ -73,6 +75,7 @@ describe(IntegManifestSynthesizer, () => { testCases: { ['Integ/DefaultTest']: { assertionStack: 'Integ/DefaultTest/DeployAssert', + assertionStackName: 'IntegDefaultTestDeployAssert4E6713E1', stacks: ['stack'], }, }, @@ -100,10 +103,12 @@ describe(IntegManifestSynthesizer, () => { testCases: { ['Integ/DefaultTest']: { assertionStack: 'Integ/DefaultTest/DeployAssert', + assertionStackName: 'IntegDefaultTestDeployAssert4E6713E1', stacks: ['stack'], }, ['Case/CaseTestCase']: { assertionStack: 'Case/CaseTestCase/DeployAssert', + assertionStackName: 'CaseCaseTestCaseDeployAssertF0B5763D', diffAssets: true, stacks: ['Case'], },