From 29f7f4135ef2dc0d01cfc5381a80ff79fa1f10d1 Mon Sep 17 00:00:00 2001 From: Mohamed ElAsmar Date: Sat, 14 Sep 2024 18:05:14 -0700 Subject: [PATCH] fix failing integ test --- ...-nested-stack-in-product-stack.assets.json | 60 +++++++++---------- ...ested-stack-in-product-stack.template.json | 16 ++--- .../manifest.json | 10 ++-- .../tree.json | 10 ++-- .../integ.nested-stack-in-product-stack.ts | 2 +- 5 files changed, 49 insertions(+), 49 deletions(-) diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-servicecatalog/test/integ.nested-stack-in-product-stack.js.snapshot/aws-cdk-nested-stack-in-product-stack.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-servicecatalog/test/integ.nested-stack-in-product-stack.js.snapshot/aws-cdk-nested-stack-in-product-stack.assets.json index 527a50cb54931..a1be2ecb784aa 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-servicecatalog/test/integ.nested-stack-in-product-stack.js.snapshot/aws-cdk-nested-stack-in-product-stack.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-servicecatalog/test/integ.nested-stack-in-product-stack.js.snapshot/aws-cdk-nested-stack-in-product-stack.assets.json @@ -7,11 +7,11 @@ "packaging": "zip" }, "destinations": { - "772514331817-us-east-1": { - "bucketName": "cdk-hnb659fds-assets-772514331817-us-east-1", + "12345678-test-region": { + "bucketName": "cdk-hnb659fds-assets-12345678-test-region", "objectKey": "d3833f63e813b3a96ea04c8c50ca98209330867f5f6ac358efca11f85a3476c2.zip", - "region": "us-east-1", - "assumeRoleArn": "arn:${AWS::Partition}:iam::772514331817:role/cdk-hnb659fds-file-publishing-role-772514331817-us-east-1" + "region": "test-region", + "assumeRoleArn": "arn:${AWS::Partition}:iam::12345678:role/cdk-hnb659fds-file-publishing-role-12345678-test-region" } } }, @@ -21,11 +21,11 @@ "packaging": "file" }, "destinations": { - "772514331817-us-east-1": { - "bucketName": "cdk-hnb659fds-assets-772514331817-us-east-1", + "12345678-test-region": { + "bucketName": "cdk-hnb659fds-assets-12345678-test-region", "objectKey": "3322b7049fb0ed2b7cbb644a2ada8d1116ff80c32dca89e6ada846b5de26f961.zip", - "region": "us-east-1", - "assumeRoleArn": "arn:${AWS::Partition}:iam::772514331817:role/cdk-hnb659fds-file-publishing-role-772514331817-us-east-1" + "region": "test-region", + "assumeRoleArn": "arn:${AWS::Partition}:iam::12345678:role/cdk-hnb659fds-file-publishing-role-12345678-test-region" } } }, @@ -35,11 +35,11 @@ "packaging": "zip" }, "destinations": { - "772514331817-us-east-1": { - "bucketName": "cdk-hnb659fds-assets-772514331817-us-east-1", + "12345678-test-region": { + "bucketName": "cdk-hnb659fds-assets-12345678-test-region", "objectKey": "a4c4da3d8af8741fce375f7ccc826c875d4a5c51f00b6aa09a1a90154236948e.zip", - "region": "us-east-1", - "assumeRoleArn": "arn:${AWS::Partition}:iam::772514331817:role/cdk-hnb659fds-file-publishing-role-772514331817-us-east-1" + "region": "test-region", + "assumeRoleArn": "arn:${AWS::Partition}:iam::12345678:role/cdk-hnb659fds-file-publishing-role-12345678-test-region" } } }, @@ -49,11 +49,11 @@ "packaging": "zip" }, "destinations": { - "772514331817-us-east-1": { - "bucketName": "cdk-hnb659fds-assets-772514331817-us-east-1", + "12345678-test-region": { + "bucketName": "cdk-hnb659fds-assets-12345678-test-region", "objectKey": "e2204c9fddfc339ea362dec9143b4c22f883d4c18dd38c456f8f6a7161c1073d.zip", - "region": "us-east-1", - "assumeRoleArn": "arn:${AWS::Partition}:iam::772514331817:role/cdk-hnb659fds-file-publishing-role-772514331817-us-east-1" + "region": "test-region", + "assumeRoleArn": "arn:${AWS::Partition}:iam::12345678:role/cdk-hnb659fds-file-publishing-role-12345678-test-region" } } }, @@ -63,11 +63,11 @@ "packaging": "file" }, "destinations": { - "772514331817-us-east-1": { - "bucketName": "cdk-hnb659fds-assets-772514331817-us-east-1", + "12345678-test-region": { + "bucketName": "cdk-hnb659fds-assets-12345678-test-region", "objectKey": "75d608df75f61dac3fdadd6450401e430ffcdcc3face2dbe3c656ebf102bb8c1.json", - "region": "us-east-1", - "assumeRoleArn": "arn:${AWS::Partition}:iam::772514331817:role/cdk-hnb659fds-file-publishing-role-772514331817-us-east-1" + "region": "test-region", + "assumeRoleArn": "arn:${AWS::Partition}:iam::12345678:role/cdk-hnb659fds-file-publishing-role-12345678-test-region" } } }, @@ -77,25 +77,25 @@ "packaging": "file" }, "destinations": { - "772514331817-us-east-1": { - "bucketName": "cdk-hnb659fds-assets-772514331817-us-east-1", + "12345678-test-region": { + "bucketName": "cdk-hnb659fds-assets-12345678-test-region", "objectKey": "b19855fc4d79148d4a4bcf46bdec84d2838a1ff6787e8aa2eaa98c0f7d8b9ac8.json", - "region": "us-east-1", - "assumeRoleArn": "arn:${AWS::Partition}:iam::772514331817:role/cdk-hnb659fds-file-publishing-role-772514331817-us-east-1" + "region": "test-region", + "assumeRoleArn": "arn:${AWS::Partition}:iam::12345678:role/cdk-hnb659fds-file-publishing-role-12345678-test-region" } } }, - "779d6658fb5642c640f02b2738b84ceba34a503182c3a40b8f9878844caacd4a": { + "82629cb4c70d03e3d3b371d5cf81fe327818bff7870c24e14eff8621c021d306": { "source": { "path": "aws-cdk-nested-stack-in-product-stack.template.json", "packaging": "file" }, "destinations": { - "772514331817-us-east-1": { - "bucketName": "cdk-hnb659fds-assets-772514331817-us-east-1", - "objectKey": "779d6658fb5642c640f02b2738b84ceba34a503182c3a40b8f9878844caacd4a.json", - "region": "us-east-1", - "assumeRoleArn": "arn:${AWS::Partition}:iam::772514331817:role/cdk-hnb659fds-file-publishing-role-772514331817-us-east-1" + "12345678-test-region": { + "bucketName": "cdk-hnb659fds-assets-12345678-test-region", + "objectKey": "82629cb4c70d03e3d3b371d5cf81fe327818bff7870c24e14eff8621c021d306.json", + "region": "test-region", + "assumeRoleArn": "arn:${AWS::Partition}:iam::12345678:role/cdk-hnb659fds-file-publishing-role-12345678-test-region" } } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-servicecatalog/test/integ.nested-stack-in-product-stack.js.snapshot/aws-cdk-nested-stack-in-product-stack.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-servicecatalog/test/integ.nested-stack-in-product-stack.js.snapshot/aws-cdk-nested-stack-in-product-stack.template.json index e23ae1120c022..a29fa3ffb111f 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-servicecatalog/test/integ.nested-stack-in-product-stack.js.snapshot/aws-cdk-nested-stack-in-product-stack.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-servicecatalog/test/integ.nested-stack-in-product-stack.js.snapshot/aws-cdk-nested-stack-in-product-stack.template.json @@ -18,7 +18,7 @@ "Type": "AWS::Lambda::LayerVersion", "Properties": { "Content": { - "S3Bucket": "cdk-hnb659fds-assets-772514331817-us-east-1", + "S3Bucket": "cdk-hnb659fds-assets-12345678-test-region", "S3Key": "3322b7049fb0ed2b7cbb644a2ada8d1116ff80c32dca89e6ada846b5de26f961.zip" }, "Description": "/opt/awscli/aws" @@ -34,9 +34,9 @@ ] }, "SourceBucketNames": [ - "cdk-hnb659fds-assets-772514331817-us-east-1", - "cdk-hnb659fds-assets-772514331817-us-east-1", - "cdk-hnb659fds-assets-772514331817-us-east-1" + "cdk-hnb659fds-assets-12345678-test-region", + "cdk-hnb659fds-assets-12345678-test-region", + "cdk-hnb659fds-assets-12345678-test-region" ], "SourceObjectKeys": [ "d3833f63e813b3a96ea04c8c50ca98209330867f5f6ac358efca11f85a3476c2.zip", @@ -111,7 +111,7 @@ { "Ref": "AWS::Partition" }, - ":s3:::cdk-hnb659fds-assets-772514331817-us-east-1" + ":s3:::cdk-hnb659fds-assets-12345678-test-region" ] ] }, @@ -123,7 +123,7 @@ { "Ref": "AWS::Partition" }, - ":s3:::cdk-hnb659fds-assets-772514331817-us-east-1/*" + ":s3:::cdk-hnb659fds-assets-12345678-test-region/*" ] ] } @@ -181,7 +181,7 @@ "Type": "AWS::Lambda::Function", "Properties": { "Code": { - "S3Bucket": "cdk-hnb659fds-assets-772514331817-us-east-1", + "S3Bucket": "cdk-hnb659fds-assets-12345678-test-region", "S3Key": "a4c4da3d8af8741fce375f7ccc826c875d4a5c51f00b6aa09a1a90154236948e.zip" }, "Environment": { @@ -219,7 +219,7 @@ "DisableTemplateValidation": false, "Info": { "LoadTemplateFromURL": { - "Fn::Sub": "https://s3.us-east-1.${AWS::URLSuffix}/cdk-hnb659fds-assets-772514331817-us-east-1/b19855fc4d79148d4a4bcf46bdec84d2838a1ff6787e8aa2eaa98c0f7d8b9ac8.json" + "Fn::Sub": "https://s3.test-region.${AWS::URLSuffix}/cdk-hnb659fds-assets-12345678-test-region/b19855fc4d79148d4a4bcf46bdec84d2838a1ff6787e8aa2eaa98c0f7d8b9ac8.json" } }, "Name": "v1" diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-servicecatalog/test/integ.nested-stack-in-product-stack.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-servicecatalog/test/integ.nested-stack-in-product-stack.js.snapshot/manifest.json index e61762cc58d7e..cf9ba78e892b5 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-servicecatalog/test/integ.nested-stack-in-product-stack.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-servicecatalog/test/integ.nested-stack-in-product-stack.js.snapshot/manifest.json @@ -11,21 +11,21 @@ }, "aws-cdk-nested-stack-in-product-stack": { "type": "aws:cloudformation:stack", - "environment": "aws://772514331817/us-east-1", + "environment": "aws://12345678/test-region", "properties": { "templateFile": "aws-cdk-nested-stack-in-product-stack.template.json", "terminationProtection": false, "validateOnSynth": false, - "assumeRoleArn": "arn:${AWS::Partition}:iam::772514331817:role/cdk-hnb659fds-deploy-role-772514331817-us-east-1", - "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::772514331817:role/cdk-hnb659fds-cfn-exec-role-772514331817-us-east-1", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-772514331817-us-east-1/779d6658fb5642c640f02b2738b84ceba34a503182c3a40b8f9878844caacd4a.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::12345678:role/cdk-hnb659fds-deploy-role-12345678-test-region", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::12345678:role/cdk-hnb659fds-cfn-exec-role-12345678-test-region", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-12345678-test-region/82629cb4c70d03e3d3b371d5cf81fe327818bff7870c24e14eff8621c021d306.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ "aws-cdk-nested-stack-in-product-stack.assets" ], "lookupRole": { - "arn": "arn:${AWS::Partition}:iam::772514331817:role/cdk-hnb659fds-lookup-role-772514331817-us-east-1", + "arn": "arn:${AWS::Partition}:iam::12345678:role/cdk-hnb659fds-lookup-role-12345678-test-region", "requiresBootstrapStackVersion": 8, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-servicecatalog/test/integ.nested-stack-in-product-stack.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-servicecatalog/test/integ.nested-stack-in-product-stack.js.snapshot/tree.json index 91f4789b2f91f..db6b440fc45af 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-servicecatalog/test/integ.nested-stack-in-product-stack.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-servicecatalog/test/integ.nested-stack-in-product-stack.js.snapshot/tree.json @@ -73,7 +73,7 @@ "aws:cdk:cloudformation:type": "AWS::Lambda::LayerVersion", "aws:cdk:cloudformation:props": { "content": { - "s3Bucket": "cdk-hnb659fds-assets-772514331817-us-east-1", + "s3Bucket": "cdk-hnb659fds-assets-12345678-test-region", "s3Key": "3322b7049fb0ed2b7cbb644a2ada8d1116ff80c32dca89e6ada846b5de26f961.zip" }, "description": "/opt/awscli/aws" @@ -514,7 +514,7 @@ { "Ref": "AWS::Partition" }, - ":s3:::cdk-hnb659fds-assets-772514331817-us-east-1" + ":s3:::cdk-hnb659fds-assets-12345678-test-region" ] ] }, @@ -526,7 +526,7 @@ { "Ref": "AWS::Partition" }, - ":s3:::cdk-hnb659fds-assets-772514331817-us-east-1/*" + ":s3:::cdk-hnb659fds-assets-12345678-test-region/*" ] ] } @@ -630,7 +630,7 @@ "aws:cdk:cloudformation:type": "AWS::Lambda::Function", "aws:cdk:cloudformation:props": { "code": { - "s3Bucket": "cdk-hnb659fds-assets-772514331817-us-east-1", + "s3Bucket": "cdk-hnb659fds-assets-12345678-test-region", "s3Key": "a4c4da3d8af8741fce375f7ccc826c875d4a5c51f00b6aa09a1a90154236948e.zip" }, "environment": { @@ -683,7 +683,7 @@ "disableTemplateValidation": false, "info": { "LoadTemplateFromURL": { - "Fn::Sub": "https://s3.us-east-1.${AWS::URLSuffix}/cdk-hnb659fds-assets-772514331817-us-east-1/b19855fc4d79148d4a4bcf46bdec84d2838a1ff6787e8aa2eaa98c0f7d8b9ac8.json" + "Fn::Sub": "https://s3.test-region.${AWS::URLSuffix}/cdk-hnb659fds-assets-12345678-test-region/b19855fc4d79148d4a4bcf46bdec84d2838a1ff6787e8aa2eaa98c0f7d8b9ac8.json" } } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-servicecatalog/test/integ.nested-stack-in-product-stack.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-servicecatalog/test/integ.nested-stack-in-product-stack.ts index db2a1917dd0fb..e69d63b3588b9 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-servicecatalog/test/integ.nested-stack-in-product-stack.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-servicecatalog/test/integ.nested-stack-in-product-stack.ts @@ -12,7 +12,7 @@ class ServiceCatalogStack extends Stack { super(scope, id, props); const assetBucket = new s3.Bucket(this, 'AssetBucket', { - bucketName: 'asset-bucket-12345678-test-region', + bucketName: `asset-bucket-${this.account}-${this.region}`, }); new sc.CloudFormationProduct(this, 'SampleProduct', {