-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
2,728 additions
and
200 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 19 additions & 4 deletions
23
packages/@aws-cdk/integ-runner/test/language-tests/integ.typescript-test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,24 @@ | ||
import { App, Stack } from '@aws-cdk/core'; | ||
import { IntegTest } from '@aws-cdk/integ-tests'; | ||
import { App, Stack } from "@aws-cdk/core"; | ||
import { ExpectedResult, IntegTest } from "@aws-cdk/integ-tests"; | ||
import * as sqs from "@aws-cdk/aws-sqs"; | ||
|
||
const app = new App(); | ||
const stack = new Stack(app); | ||
const stack = new Stack(app, "TypeScriptStack"); | ||
|
||
new IntegTest(app, 'Integ', { testCases: [stack] }); | ||
const queue = new sqs.Queue(stack, "Queue", { | ||
fifo: true, | ||
}); | ||
|
||
const integ = new IntegTest(app, "TypeScript", { testCases: [stack] }); | ||
|
||
integ.assertions | ||
.awsApiCall("SQS", "getQueueAttributes", { | ||
QueueUrl: queue.queueUrl, | ||
AttributeNames: ["QueueArn"], | ||
}) | ||
.assertAtPath( | ||
"Attributes.QueueArn", | ||
ExpectedResult.stringLikeRegexp(".*\\.fifo$") | ||
); | ||
|
||
app.synth(); |
19 changes: 0 additions & 19 deletions
19
...-tests/integ.typescript-test.ts.snapshot/IntegDefaultTestDeployAssert4E6713E1.assets.json
This file was deleted.
Oops, something went wrong.
36 changes: 0 additions & 36 deletions
36
...ests/integ.typescript-test.ts.snapshot/IntegDefaultTestDeployAssert4E6713E1.template.json
This file was deleted.
Oops, something went wrong.
32 changes: 32 additions & 0 deletions
32
...s/integ.typescript-test.ts.snapshot/TypeScriptDefaultTestDeployAssert326F54C0.assets.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"version": "22.0.0", | ||
"files": { | ||
"278d42fa865f60954d898636503d0ee86a6689d73dc50eb912fac62def0ef6a4": { | ||
"source": { | ||
"path": "asset.278d42fa865f60954d898636503d0ee86a6689d73dc50eb912fac62def0ef6a4.bundle", | ||
"packaging": "zip" | ||
}, | ||
"destinations": { | ||
"current_account-current_region": { | ||
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", | ||
"objectKey": "278d42fa865f60954d898636503d0ee86a6689d73dc50eb912fac62def0ef6a4.zip", | ||
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" | ||
} | ||
} | ||
}, | ||
"884f6a34f5af139919c79f7141fa993fe740ad1b22d8376b8c410891a5375258": { | ||
"source": { | ||
"path": "TypeScriptDefaultTestDeployAssert326F54C0.template.json", | ||
"packaging": "file" | ||
}, | ||
"destinations": { | ||
"current_account-current_region": { | ||
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", | ||
"objectKey": "884f6a34f5af139919c79f7141fa993fe740ad1b22d8376b8c410891a5375258.json", | ||
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" | ||
} | ||
} | ||
} | ||
}, | ||
"dockerImages": {} | ||
} |
139 changes: 139 additions & 0 deletions
139
...integ.typescript-test.ts.snapshot/TypeScriptDefaultTestDeployAssert326F54C0.template.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
{ | ||
"Resources": { | ||
"AwsApiCallSQSgetQueueAttributes": { | ||
"Type": "Custom::DeployAssert@SdkCallSQSgetQueueAttributes", | ||
"Properties": { | ||
"ServiceToken": { | ||
"Fn::GetAtt": [ | ||
"SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F", | ||
"Arn" | ||
] | ||
}, | ||
"service": "SQS", | ||
"api": "getQueueAttributes", | ||
"expected": "{\"$StringLike\":\".*\\\\.fifo$\"}", | ||
"actualPath": "Attributes.QueueArn", | ||
"parameters": { | ||
"QueueUrl": { | ||
"Fn::ImportValue": "TypeScriptStack:ExportsOutputRefQueue4A7E3555425E8BD3" | ||
}, | ||
"AttributeNames": [ | ||
"QueueArn" | ||
] | ||
}, | ||
"flattenResponse": "true", | ||
"outputPaths": [ | ||
"Attributes.QueueArn" | ||
], | ||
"salt": "1672925181504" | ||
}, | ||
"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": [ | ||
"sqs:GetQueueAttributes" | ||
], | ||
"Effect": "Allow", | ||
"Resource": [ | ||
"*" | ||
] | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"SingletonFunction1488541a7b23466481b69b4408076b81HandlerCD40AE9F": { | ||
"Type": "AWS::Lambda::Function", | ||
"Properties": { | ||
"Runtime": "nodejs14.x", | ||
"Code": { | ||
"S3Bucket": { | ||
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}" | ||
}, | ||
"S3Key": "278d42fa865f60954d898636503d0ee86a6689d73dc50eb912fac62def0ef6a4.zip" | ||
}, | ||
"Timeout": 120, | ||
"Handler": "index.handler", | ||
"Role": { | ||
"Fn::GetAtt": [ | ||
"SingletonFunction1488541a7b23466481b69b4408076b81Role37ABCE73", | ||
"Arn" | ||
] | ||
} | ||
} | ||
} | ||
}, | ||
"Outputs": { | ||
"AssertionResultsAwsApiCallSQSgetQueueAttributes": { | ||
"Value": { | ||
"Fn::GetAtt": [ | ||
"AwsApiCallSQSgetQueueAttributes", | ||
"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." | ||
} | ||
] | ||
} | ||
} | ||
} |
6 changes: 3 additions & 3 deletions
6
...thon-test.py.snapshot/Default.assets.json → ...t.ts.snapshot/TypeScriptStack.assets.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
...pt-test.ts.snapshot/Default.template.json → ...ts.snapshot/TypeScriptStack.template.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.