From 03948d85de5ab1ddb8b03782cd4179b3922a4448 Mon Sep 17 00:00:00 2001 From: ren-yamanashi Date: Mon, 13 Jan 2025 11:30:41 +0900 Subject: [PATCH] test: update integ test --- .../IntegUserPoolClientAnalytics.assets.json | 4 ++-- ...IntegUserPoolClientAnalytics.template.json | 16 ++++++++++++++ .../manifest.json | 8 ++++++- .../tree.json | 22 +++++++++++++++++++ .../test/integ.user-pool-client-analytics.ts | 16 +++++++------- 5 files changed, 55 insertions(+), 11 deletions(-) diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-cognito/test/integ.user-pool-client-analytics.js.snapshot/IntegUserPoolClientAnalytics.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-cognito/test/integ.user-pool-client-analytics.js.snapshot/IntegUserPoolClientAnalytics.assets.json index 7ca9a2eefca99..2c08ad528cdde 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-cognito/test/integ.user-pool-client-analytics.js.snapshot/IntegUserPoolClientAnalytics.assets.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-cognito/test/integ.user-pool-client-analytics.js.snapshot/IntegUserPoolClientAnalytics.assets.json @@ -1,7 +1,7 @@ { "version": "39.0.0", "files": { - "6b5d4a87d1fa553f9590f01d9c1e9e5a5fb6ef1b65642f9e6769023b3003beaa": { + "06837b5f56905cadd45bee07587d7e3fa41897bcbbf0b7bf3c3ddcfef3431f9d": { "source": { "path": "IntegUserPoolClientAnalytics.template.json", "packaging": "file" @@ -9,7 +9,7 @@ "destinations": { "current_account-current_region": { "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", - "objectKey": "6b5d4a87d1fa553f9590f01d9c1e9e5a5fb6ef1b65642f9e6769023b3003beaa.json", + "objectKey": "06837b5f56905cadd45bee07587d7e3fa41897bcbbf0b7bf3c3ddcfef3431f9d.json", "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-cognito/test/integ.user-pool-client-analytics.js.snapshot/IntegUserPoolClientAnalytics.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-cognito/test/integ.user-pool-client-analytics.js.snapshot/IntegUserPoolClientAnalytics.template.json index 1627aa1957b7c..7a43d3c0ac96f 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-cognito/test/integ.user-pool-client-analytics.js.snapshot/IntegUserPoolClientAnalytics.template.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-cognito/test/integ.user-pool-client-analytics.js.snapshot/IntegUserPoolClientAnalytics.template.json @@ -1,5 +1,13 @@ { "Resources": { + "PinpointApp": { + "Type": "AWS::Pinpoint::App", + "Properties": { + "Name": "MyPinpointApp" + }, + "UpdateReplacePolicy": "Delete", + "DeletionPolicy": "Delete" + }, "PoolD3F588B8": { "Type": "AWS::Cognito::UserPool", "Properties": { @@ -46,6 +54,14 @@ "openid", "aws.cognito.signin.user.admin" ], + "AnalyticsConfiguration": { + "ApplicationArn": { + "Fn::GetAtt": [ + "PinpointApp", + "Arn" + ] + } + }, "CallbackURLs": [ "https://example.com" ], diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-cognito/test/integ.user-pool-client-analytics.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-cognito/test/integ.user-pool-client-analytics.js.snapshot/manifest.json index 3274633827de2..92a9c8faece93 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-cognito/test/integ.user-pool-client-analytics.js.snapshot/manifest.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-cognito/test/integ.user-pool-client-analytics.js.snapshot/manifest.json @@ -18,7 +18,7 @@ "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}", - "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/6b5d4a87d1fa553f9590f01d9c1e9e5a5fb6ef1b65642f9e6769023b3003beaa.json", + "stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/06837b5f56905cadd45bee07587d7e3fa41897bcbbf0b7bf3c3ddcfef3431f9d.json", "requiresBootstrapStackVersion": 6, "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", "additionalDependencies": [ @@ -34,6 +34,12 @@ "IntegUserPoolClientAnalytics.assets" ], "metadata": { + "/IntegUserPoolClientAnalytics/PinpointApp": [ + { + "type": "aws:cdk:logicalId", + "data": "PinpointApp" + } + ], "/IntegUserPoolClientAnalytics/Pool/Resource": [ { "type": "aws:cdk:logicalId", diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-cognito/test/integ.user-pool-client-analytics.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-cognito/test/integ.user-pool-client-analytics.js.snapshot/tree.json index 6f8fa7e5a1faf..001c5a1b64cfb 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-cognito/test/integ.user-pool-client-analytics.js.snapshot/tree.json +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-cognito/test/integ.user-pool-client-analytics.js.snapshot/tree.json @@ -8,6 +8,20 @@ "id": "IntegUserPoolClientAnalytics", "path": "IntegUserPoolClientAnalytics", "children": { + "PinpointApp": { + "id": "PinpointApp", + "path": "IntegUserPoolClientAnalytics/PinpointApp", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::Pinpoint::App", + "aws:cdk:cloudformation:props": { + "name": "MyPinpointApp" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_pinpoint.CfnApp", + "version": "0.0.0" + } + }, "Pool": { "id": "Pool", "path": "IntegUserPoolClientAnalytics/Pool", @@ -71,6 +85,14 @@ "openid", "aws.cognito.signin.user.admin" ], + "analyticsConfiguration": { + "applicationArn": { + "Fn::GetAtt": [ + "PinpointApp", + "Arn" + ] + } + }, "callbackUrLs": [ "https://example.com" ], diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-cognito/test/integ.user-pool-client-analytics.ts b/packages/@aws-cdk-testing/framework-integ/test/aws-cognito/test/integ.user-pool-client-analytics.ts index 7d0a235416791..2d9d937ab6c99 100644 --- a/packages/@aws-cdk-testing/framework-integ/test/aws-cognito/test/integ.user-pool-client-analytics.ts +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-cognito/test/integ.user-pool-client-analytics.ts @@ -2,7 +2,7 @@ import { IntegTest } from '@aws-cdk/integ-tests-alpha'; import { App, Stack, RemovalPolicy } from 'aws-cdk-lib'; import { UserPool } from 'aws-cdk-lib/aws-cognito'; // import { PolicyStatement, Role, ServicePrincipal } from 'aws-cdk-lib/aws-iam'; -// import { CfnApp } from 'aws-cdk-lib/aws-pinpoint'; +import { CfnApp } from 'aws-cdk-lib/aws-pinpoint'; import { Construct } from 'constructs'; /** @@ -12,10 +12,10 @@ class TestStack extends Stack { constructor(scope: Construct, id: string) { super(scope, id); - // const pinpointApp = new CfnApp(this, 'PinpointApp', { - // name: 'MyPinpointApp', - // }); - // pinpointApp.applyRemovalPolicy(RemovalPolicy.DESTROY); + const pinpointApp = new CfnApp(this, 'PinpointApp', { + name: 'MyPinpointApp', + }); + pinpointApp.applyRemovalPolicy(RemovalPolicy.DESTROY); const userPool = new UserPool(this, 'Pool', { removalPolicy: RemovalPolicy.DESTROY, @@ -23,9 +23,9 @@ class TestStack extends Stack { userPool.addClient('Client', { generateSecret: true, - // analytics: { - // applicationArn: pinpointApp.attrArn, - // }, + analytics: { + applicationArn: pinpointApp.attrArn, + }, }); } }