From 053a8b8de2a404f1ca6f8fc3e5c52eb8f445237a Mon Sep 17 00:00:00 2001 From: Tatsuya Mori Date: Fri, 20 Oct 2023 06:30:44 +0000 Subject: [PATCH] Remove hardcoded account id from snapshot --- ...s-cdk-subscriptionfilter-integ.assets.json | 9 ++--- .../cdk.out | 2 +- .../integ.json | 2 +- ...efaultTestDeployAssert24D5C536.assets.json | 2 +- .../manifest.json | 14 ++++--- .../tree.json | 38 +++++++++---------- .../aws-logs/test/integ.subscriptionfilter.ts | 7 +--- 7 files changed, 35 insertions(+), 39 deletions(-) diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.subscriptionfilter.js.snapshot/aws-cdk-subscriptionfilter-integ.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.subscriptionfilter.js.snapshot/aws-cdk-subscriptionfilter-integ.assets.json index f088793003f6e..d74631db72e1e 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.subscriptionfilter.js.snapshot/aws-cdk-subscriptionfilter-integ.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.subscriptionfilter.js.snapshot/aws-cdk-subscriptionfilter-integ.assets.json @@ -1,5 +1,5 @@ { - "version": "32.0.0", + "version": "34.0.0", "files": { "7db545e495a738edfcd36389d734d374090aa78c8532312439ddb90cfffdc1ef": { "source": { @@ -7,11 +7,10 @@ "packaging": "file" }, "destinations": { - "355939527584-us-east-1": { - "bucketName": "cdk-hnb659fds-assets-355939527584-us-east-1", + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", "objectKey": "7db545e495a738edfcd36389d734d374090aa78c8532312439ddb90cfffdc1ef.json", - "region": "us-east-1", - "assumeRoleArn": "arn:${AWS::Partition}:iam::355939527584:role/cdk-hnb659fds-file-publishing-role-355939527584-us-east-1" + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" } } } diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.subscriptionfilter.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.subscriptionfilter.js.snapshot/cdk.out index f0b901e7c06e5..2313ab5436501 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.subscriptionfilter.js.snapshot/cdk.out +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.subscriptionfilter.js.snapshot/cdk.out @@ -1 +1 @@ -{"version":"32.0.0"} \ No newline at end of file +{"version":"34.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.subscriptionfilter.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.subscriptionfilter.js.snapshot/integ.json index 894035b7c9314..7fdc705d682ef 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.subscriptionfilter.js.snapshot/integ.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.subscriptionfilter.js.snapshot/integ.json @@ -1,5 +1,5 @@ { - "version": "32.0.0", + "version": "34.0.0", "testCases": { "integ-test/DefaultTest": { "stacks": [ diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.subscriptionfilter.js.snapshot/integtestDefaultTestDeployAssert24D5C536.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.subscriptionfilter.js.snapshot/integtestDefaultTestDeployAssert24D5C536.assets.json index 4b008a0cae838..2b470996152e4 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.subscriptionfilter.js.snapshot/integtestDefaultTestDeployAssert24D5C536.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.subscriptionfilter.js.snapshot/integtestDefaultTestDeployAssert24D5C536.assets.json @@ -1,5 +1,5 @@ { - "version": "32.0.0", + "version": "34.0.0", "files": { "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { "source": { diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.subscriptionfilter.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.subscriptionfilter.js.snapshot/manifest.json index 65838f5fcbc44..04cb3ee1404dd 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.subscriptionfilter.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.subscriptionfilter.js.snapshot/manifest.json @@ -1,5 +1,5 @@ { - "version": "32.0.0", + "version": "34.0.0", "artifacts": { "aws-cdk-subscriptionfilter-integ.assets": { "type": "cdk:asset-manifest", @@ -11,20 +11,21 @@ }, "aws-cdk-subscriptionfilter-integ": { "type": "aws:cloudformation:stack", - "environment": "aws://355939527584/us-east-1", + "environment": "aws://unknown-account/unknown-region", "properties": { "templateFile": "aws-cdk-subscriptionfilter-integ.template.json", + "terminationProtection": false, "validateOnSynth": false, - "assumeRoleArn": "arn:${AWS::Partition}:iam::355939527584:role/cdk-hnb659fds-deploy-role-355939527584-us-east-1", - "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::355939527584:role/cdk-hnb659fds-cfn-exec-role-355939527584-us-east-1", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-355939527584-us-east-1/7db545e495a738edfcd36389d734d374090aa78c8532312439ddb90cfffdc1ef.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", + "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/7db545e495a738edfcd36389d734d374090aa78c8532312439ddb90cfffdc1ef.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ "aws-cdk-subscriptionfilter-integ.assets" ], "lookupRole": { - "arn": "arn:${AWS::Partition}:iam::355939527584:role/cdk-hnb659fds-lookup-role-355939527584-us-east-1", + "arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}", "requiresBootstrapStackVersion": 8, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" } @@ -91,6 +92,7 @@ "environment": "aws://unknown-account/unknown-region", "properties": { "templateFile": "integtestDefaultTestDeployAssert24D5C536.template.json", + "terminationProtection": false, "validateOnSynth": false, "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-deploy-role-${AWS::AccountId}-${AWS::Region}", "cloudFormationExecutionRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-cfn-exec-role-${AWS::AccountId}-${AWS::Region}", diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.subscriptionfilter.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.subscriptionfilter.js.snapshot/tree.json index 098ac062564a3..bf4d9fa54a181 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.subscriptionfilter.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.subscriptionfilter.js.snapshot/tree.json @@ -23,7 +23,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } }, "Subscription": { @@ -54,7 +54,7 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } }, "Resource": { @@ -78,19 +78,19 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } }, "Function": { @@ -106,7 +106,7 @@ "path": "aws-cdk-subscriptionfilter-integ/Function/ServiceRole/ImportServiceRole", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } }, "Resource": { @@ -145,13 +145,13 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } }, "Resource": { @@ -175,13 +175,13 @@ }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } }, "BootstrapVersion": { @@ -189,7 +189,7 @@ "path": "aws-cdk-subscriptionfilter-integ/BootstrapVersion", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } }, "CheckBootstrapVersion": { @@ -197,13 +197,13 @@ "path": "aws-cdk-subscriptionfilter-integ/CheckBootstrapVersion", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } }, "integ-test": { @@ -219,7 +219,7 @@ "path": "integ-test/DefaultTest/Default", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } }, "DeployAssert": { @@ -231,7 +231,7 @@ "path": "integ-test/DefaultTest/DeployAssert/BootstrapVersion", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } }, "CheckBootstrapVersion": { @@ -239,13 +239,13 @@ "path": "integ-test/DefaultTest/DeployAssert/CheckBootstrapVersion", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } } }, @@ -265,13 +265,13 @@ "path": "Tree", "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } } }, "constructInfo": { "fqn": "constructs.Construct", - "version": "10.2.69" + "version": "10.2.70" } } } \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.subscriptionfilter.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.subscriptionfilter.ts index 047a5314a8f7f..da667b0bf9334 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.subscriptionfilter.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-logs/test/integ.subscriptionfilter.ts @@ -25,12 +25,7 @@ class SubscriptionFilterIntegStack extends Stack { } const app = new App(); -const testCase = new SubscriptionFilterIntegStack(app, 'aws-cdk-subscriptionfilter-integ', { - env: { - account: process.env.CDK_INTEG_ACCOUNT || process.env.CDK_DEFAULT_ACCOUNT, - region: process.env.CDK_INTEG_REGION || process.env.CDK_DEFAULT_REGION, - }, -}); +const testCase = new SubscriptionFilterIntegStack(app, 'aws-cdk-subscriptionfilter-integ'); new IntegTest(app, 'integ-test', { testCases: [testCase],