Skip to content

Commit

Permalink
add distributed map integration tests and update existing integration…
Browse files Browse the repository at this point in the history
… tests
  • Loading branch information
beck3905 committed Feb 24, 2023
1 parent dc582b7 commit 1127646
Show file tree
Hide file tree
Showing 35 changed files with 3,074 additions and 59 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"version": "30.0.0",
"files": {
"88187762ebb3676ec68ded03ce92c045563205c6497ae5a104f13a32dbf4ef43": {
"97d16bb7ba2ae6d9cb22f0b1fa8baa7c02af5176b7d5c016a6824361a838e616": {
"source": {
"path": "aws-stepfunctions-custom-state-integ.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "88187762ebb3676ec68ded03ce92c045563205c6497ae5a104f13a32dbf4ef43.json",
"objectKey": "97d16bb7ba2ae6d9cb22f0b1fa8baa7c02af5176b7d5c016a6824361a838e616.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@
},
"DefinitionString": "{\"StartAt\":\"my custom task\",\"States\":{\"my custom task\":{\"Next\":\"final step\",\"Type\":\"Task\",\"Resource\":\"arn:aws:states:::dynamodb:putItem\",\"Parameters\":{\"TableName\":\"my-cool-table\",\"Item\":{\"id\":{\"S\":\"my-entry\"}}},\"ResultPath\":null},\"final step\":{\"Type\":\"Pass\",\"End\":true}},\"TimeoutSeconds\":30}"
},
"DependsOn": [
"StateMachineRoleB840431D"
],
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,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}/88187762ebb3676ec68ded03ce92c045563205c6497ae5a104f13a32dbf4ef43.json",
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/97d16bb7ba2ae6d9cb22f0b1fa8baa7c02af5176b7d5c016a6824361a838e616.json",
"requiresBootstrapStackVersion": 6,
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
"additionalDependencies": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
"path": "Tree",
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.237"
"version": "10.1.252"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"version": "30.0.0",
"files": {
"1f3c2cfb18e102edc713fe4c4b4d87572f4297ee4a5e80a5960adf526ee9ea28": {
"source": {
"path": "asset.1f3c2cfb18e102edc713fe4c4b4d87572f4297ee4a5e80a5960adf526ee9ea28.bundle",
"packaging": "zip"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "1f3c2cfb18e102edc713fe4c4b4d87572f4297ee4a5e80a5960adf526ee9ea28.zip",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
},
"9380edb21326225b7731531954a3300d128d8056a2e08756f7c804c9ac954383": {
"source": {
"path": "DistributedMapDefaultTestDeployAssertFD6CBCC4.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "9380edb21326225b7731531954a3300d128d8056a2e08756f7c804c9ac954383.json",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
}
},
"dockerImages": {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,245 @@
{
"Resources": {
"AwsApiCallStepFunctionsdescribeStateMachine": {
"Type": "Custom::DeployAssert@SdkCallStepFunctionsdescribeStateMachin",
"Properties": {
"ServiceToken": {
"Fn::GetAtt": [
"SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F",
"Arn"
]
},
"service": "StepFunctions",
"api": "describeStateMachine",
"expected": "{\"$ObjectLike\":{\"status\":\"ACTIVE\"}}",
"parameters": {
"stateMachineArn": {
"Fn::ImportValue": "aws-stepfunctions-map-integ:ExportsOutputRefStateMachine2E01A3A5BA46F753"
}
},
"flattenResponse": "false",
"salt": "1677270411254"
},
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
},
"SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73": {
"Type": "AWS::IAM::Role",
"Properties": {
"AssumeRolePolicyDocument": {
"Version": "2012-10-17",
"Statement": [
{
"Action": "sts:AssumeRole",
"Effect": "Allow",
"Principal": {
"Service": "lambda.amazonaws.com"
}
}
]
},
"ManagedPolicyArns": [
{
"Fn::Sub": "arn:${AWS::Partition}:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
}
],
"Policies": [
{
"PolicyName": "Inline",
"PolicyDocument": {
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"states:DescribeStateMachine"
],
"Effect": "Allow",
"Resource": [
"*"
]
},
{
"Action": [
"s3:PutObject"
],
"Effect": "Allow",
"Resource": [
"*"
]
},
{
"Action": [
"states:StartExecution"
],
"Effect": "Allow",
"Resource": [
"*"
]
},
{
"Action": [
"states:DescribeExecution"
],
"Effect": "Allow",
"Resource": [
"*"
]
}
]
}
}
]
}
},
"SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F": {
"Type": "AWS::Lambda::Function",
"Properties": {
"Runtime": "nodejs14.x",
"Code": {
"S3Bucket": {
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
},
"S3Key": "1f3c2cfb18e102edc713fe4c4b4d87572f4297ee4a5e80a5960adf526ee9ea28.zip"
},
"Timeout": 120,
"Handler": "index.handler",
"Role": {
"Fn::GetAtt": [
"SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73",
"Arn"
]
}
}
},
"AwsApiCallS3putObject": {
"Type": "Custom::DeployAssert@SdkCallS3putObject",
"Properties": {
"ServiceToken": {
"Fn::GetAtt": [
"SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F",
"Arn"
]
},
"service": "S3",
"api": "putObject",
"parameters": {
"Bucket": {
"Fn::ImportValue": "aws-stepfunctions-map-integ:ExportsOutputRefBucket83908E7781C90AC0"
},
"Key": "my-key.csv",
"Body": "a,b,c\n1,2,3\n4,5,6"
},
"flattenResponse": "false",
"salt": "1677270411255"
},
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
},
"AwsApiCallStepFunctionsstartExecution": {
"Type": "Custom::DeployAssert@SdkCallStepFunctionsstartExecution",
"Properties": {
"ServiceToken": {
"Fn::GetAtt": [
"SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F",
"Arn"
]
},
"service": "StepFunctions",
"api": "startExecution",
"parameters": {
"stateMachineArn": {
"Fn::ImportValue": "aws-stepfunctions-map-integ:ExportsOutputRefStateMachine2E01A3A5BA46F753"
}
},
"flattenResponse": "true",
"salt": "1677270411255"
},
"DependsOn": [
"AwsApiCallS3putObject"
],
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
},
"AwsApiCallStepFunctionsdescribeExecution": {
"Type": "Custom::DeployAssert@SdkCallStepFunctionsdescribeExecution",
"Properties": {
"ServiceToken": {
"Fn::GetAtt": [
"SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F",
"Arn"
]
},
"service": "StepFunctions",
"api": "describeExecution",
"expected": "{\"$ObjectLike\":{\"status\":\"SUCCEEDED\"}}",
"parameters": {
"executionArn": {
"Fn::GetAtt": [
"AwsApiCallStepFunctionsstartExecution",
"apiCallResponse.executionArn"
]
}
},
"flattenResponse": "false",
"salt": "1677270411255"
},
"DependsOn": [
"AwsApiCallStepFunctionsstartExecution"
],
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
}
},
"Outputs": {
"AssertionResultsAwsApiCallStepFunctionsdescribeStateMachine": {
"Value": {
"Fn::GetAtt": [
"AwsApiCallStepFunctionsdescribeStateMachine",
"assertion"
]
}
},
"AssertionResultsAwsApiCallStepFunctionsdescribeExecution": {
"Value": {
"Fn::GetAtt": [
"AwsApiCallStepFunctionsdescribeExecution",
"assertion"
]
}
}
},
"Parameters": {
"BootstrapVersion": {
"Type": "AWS::SSM::Parameter::Value<String>",
"Default": "/cdk-bootstrap/hnb659fds/version",
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
}
},
"Rules": {
"CheckBootstrapVersion": {
"Assertions": [
{
"Assert": {
"Fn::Not": [
{
"Fn::Contains": [
[
"1",
"2",
"3",
"4",
"5"
],
{
"Ref": "BootstrapVersion"
}
]
}
]
},
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
Expand Down
Loading

0 comments on commit 1127646

Please sign in to comment.