Skip to content

Commit

Permalink
updating integ tests
Browse files Browse the repository at this point in the history
  • Loading branch information
corymhall committed Mar 28, 2023
1 parent a63692b commit 20feb70
Show file tree
Hide file tree
Showing 265 changed files with 43,962 additions and 233 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "20.0.0",
"version": "31.0.0",
"files": {
"8df6c4f7f61921e6f88f328521b8a71aef10b045b77847bd61cfe75cf3a64c32": {
"source": {
Expand All @@ -14,15 +14,15 @@
}
}
},
"a5fb46bb5c70411499bb17cafda8537c5326fc1a8fee6822310feef3f2ec18da": {
"f609c920399d40798220bd4c7c34ec9576637e069628e9d575aa4a2feff868a7": {
"source": {
"path": "cdk-integ-compilations-lambda-nodejs.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "a5fb46bb5c70411499bb17cafda8537c5326fc1a8fee6822310feef3f2ec18da.json",
"objectKey": "f609c920399d40798220bd4c7c34ec9576637e069628e9d575aa4a2feff868a7.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 @@ -52,7 +52,7 @@
}
},
"Handler": "index.handler",
"Runtime": "nodejs14.x"
"Runtime": "nodejs16.x"
},
"DependsOn": [
"tsdecoratorhandlerServiceRole61E9E52C"
Expand Down Expand Up @@ -110,7 +110,7 @@
}
},
"Handler": "index.handler",
"Runtime": "nodejs14.x"
"Runtime": "nodejs16.x"
},
"DependsOn": [
"tsdecoratorhandlertsconfigServiceRoleC4AE481E"
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version":"20.0.0"}
{"version":"31.0.0"}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "20.0.0",
"version": "31.0.0",
"testCases": {
"integ.compilations": {
"stacks": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
{
"version": "20.0.0",
"version": "31.0.0",
"artifacts": {
"Tree": {
"type": "cdk:tree",
"properties": {
"file": "tree.json"
}
},
"cdk-integ-compilations-lambda-nodejs.assets": {
"type": "cdk:asset-manifest",
"properties": {
Expand All @@ -23,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}/a5fb46bb5c70411499bb17cafda8537c5326fc1a8fee6822310feef3f2ec18da.json",
"stackTemplateAssetObjectUrl": "s3://cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}/f609c920399d40798220bd4c7c34ec9576637e069628e9d575aa4a2feff868a7.json",
"requiresBootstrapStackVersion": 6,
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
"additionalDependencies": [
Expand Down Expand Up @@ -77,6 +71,12 @@
]
},
"displayName": "cdk-integ-compilations-lambda-nodejs"
},
"Tree": {
"type": "cdk:tree",
"properties": {
"file": "tree.json"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,6 @@
"id": "App",
"path": "",
"children": {
"Tree": {
"id": "Tree",
"path": "Tree",
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.85"
}
},
"cdk-integ-compilations-lambda-nodejs": {
"id": "cdk-integ-compilations-lambda-nodejs",
"path": "cdk-integ-compilations-lambda-nodejs",
Expand All @@ -24,6 +16,14 @@
"id": "ServiceRole",
"path": "cdk-integ-compilations-lambda-nodejs/ts-decorator-handler/ServiceRole",
"children": {
"ImportServiceRole": {
"id": "ImportServiceRole",
"path": "cdk-integ-compilations-lambda-nodejs/ts-decorator-handler/ServiceRole/ImportServiceRole",
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.270"
}
},
"Resource": {
"id": "Resource",
"path": "cdk-integ-compilations-lambda-nodejs/ts-decorator-handler/ServiceRole/Resource",
Expand Down Expand Up @@ -78,7 +78,7 @@
"path": "cdk-integ-compilations-lambda-nodejs/ts-decorator-handler/Code/Stage",
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.85"
"version": "10.1.270"
}
},
"AssetBucket": {
Expand Down Expand Up @@ -119,7 +119,7 @@
}
},
"handler": "index.handler",
"runtime": "nodejs14.x"
"runtime": "nodejs16.x"
}
},
"constructInfo": {
Expand All @@ -141,6 +141,14 @@
"id": "ServiceRole",
"path": "cdk-integ-compilations-lambda-nodejs/ts-decorator-handler-tsconfig/ServiceRole",
"children": {
"ImportServiceRole": {
"id": "ImportServiceRole",
"path": "cdk-integ-compilations-lambda-nodejs/ts-decorator-handler-tsconfig/ServiceRole/ImportServiceRole",
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.270"
}
},
"Resource": {
"id": "Resource",
"path": "cdk-integ-compilations-lambda-nodejs/ts-decorator-handler-tsconfig/ServiceRole/Resource",
Expand Down Expand Up @@ -195,7 +203,7 @@
"path": "cdk-integ-compilations-lambda-nodejs/ts-decorator-handler-tsconfig/Code/Stage",
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.85"
"version": "10.1.270"
}
},
"AssetBucket": {
Expand Down Expand Up @@ -236,7 +244,7 @@
}
},
"handler": "index.handler",
"runtime": "nodejs14.x"
"runtime": "nodejs16.x"
}
},
"constructInfo": {
Expand All @@ -249,17 +257,41 @@
"fqn": "@aws-cdk/aws-lambda-nodejs.NodejsFunction",
"version": "0.0.0"
}
},
"BootstrapVersion": {
"id": "BootstrapVersion",
"path": "cdk-integ-compilations-lambda-nodejs/BootstrapVersion",
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.270"
}
},
"CheckBootstrapVersion": {
"id": "CheckBootstrapVersion",
"path": "cdk-integ-compilations-lambda-nodejs/CheckBootstrapVersion",
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.270"
}
}
},
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.85"
"version": "10.1.270"
}
},
"Tree": {
"id": "Tree",
"path": "Tree",
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.270"
}
}
},
"constructInfo": {
"fqn": "constructs.Construct",
"version": "10.1.85"
"version": "10.1.270"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class TestStack extends Stack {
sourceMapMode: lambda.SourceMapMode.BOTH,
preCompilation: true,
},
runtime: Runtime.NODEJS_14_X,
runtime: Runtime.NODEJS_16_X,
});

new lambda.NodejsFunction(this, 'ts-decorator-handler-tsconfig', {
Expand All @@ -28,7 +28,7 @@ class TestStack extends Stack {
tsconfig: path.join(__dirname, '..', 'tsconfig.json'),
preCompilation: true,
},
runtime: Runtime.NODEJS_14_X,
runtime: Runtime.NODEJS_16_X,
});
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
{
"version": "29.0.0",
"version": "31.0.0",
"files": {
"1f3c2cfb18e102edc713fe4c4b4d87572f4297ee4a5e80a5960adf526ee9ea28": {
"92ec9d050245fd270cf2b0df478b31f140ba820c3407e964246946bcea933a19": {
"source": {
"path": "asset.1f3c2cfb18e102edc713fe4c4b4d87572f4297ee4a5e80a5960adf526ee9ea28.bundle",
"path": "asset.92ec9d050245fd270cf2b0df478b31f140ba820c3407e964246946bcea933a19.bundle",
"packaging": "zip"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "1f3c2cfb18e102edc713fe4c4b4d87572f4297ee4a5e80a5960adf526ee9ea28.zip",
"objectKey": "92ec9d050245fd270cf2b0df478b31f140ba820c3407e964246946bcea933a19.zip",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
},
"2bd77eb3d8c517d922b9b5e7829e28b113dacc2d80176588fcc5608794a14ffb": {
"e111cb956f29a2b7cd7d36c451cdc4ae7b2064621161ae1c7ed320f9588c32c3": {
"source": {
"path": "PnpmTestDefaultTestDeployAssert397EDF83.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "2bd77eb3d8c517d922b9b5e7829e28b113dacc2d80176588fcc5608794a14ffb.json",
"objectKey": "e111cb956f29a2b7cd7d36c451cdc4ae7b2064621161ae1c7ed320f9588c32c3.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 @@ -18,7 +18,7 @@
}
},
"flattenResponse": "false",
"salt": "1674225978419"
"salt": "1680010885937"
},
"UpdateReplacePolicy": "Delete",
"DeletionPolicy": "Delete"
Expand Down Expand Up @@ -118,7 +118,7 @@
"S3Bucket": {
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
},
"S3Key": "1f3c2cfb18e102edc713fe4c4b4d87572f4297ee4a5e80a5960adf526ee9ea28.zip"
"S3Key": "92ec9d050245fd270cf2b0df478b31f140ba820c3407e964246946bcea933a19.zip"
},
"Timeout": 120,
"Handler": "index.handler",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
{
"version": "29.0.0",
"version": "31.0.0",
"files": {
"b90974d5f9d943ad75f529ba0b8529aa1c43cbe4d63d4e0f89894d5fdcab56f9": {
"955124673880e20bd4e41d523bef58eb74503a0f574604d9ef9a6bd2c84336d6": {
"source": {
"path": "asset.b90974d5f9d943ad75f529ba0b8529aa1c43cbe4d63d4e0f89894d5fdcab56f9",
"path": "asset.955124673880e20bd4e41d523bef58eb74503a0f574604d9ef9a6bd2c84336d6",
"packaging": "zip"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "b90974d5f9d943ad75f529ba0b8529aa1c43cbe4d63d4e0f89894d5fdcab56f9.zip",
"objectKey": "955124673880e20bd4e41d523bef58eb74503a0f574604d9ef9a6bd2c84336d6.zip",
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
}
}
},
"b6922a50679c4b55d94ce943a6cc9a0e1d67006def01191f71eb7e05bfe18327": {
"fd2be9a57cb09bafce34463e8e77756fdb6fc10f343359b50f8ec5a4a847374e": {
"source": {
"path": "TestStack.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "b6922a50679c4b55d94ce943a6cc9a0e1d67006def01191f71eb7e05bfe18327.json",
"objectKey": "fd2be9a57cb09bafce34463e8e77756fdb6fc10f343359b50f8ec5a4a847374e.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 @@ -38,7 +38,7 @@
"S3Bucket": {
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
},
"S3Key": "b90974d5f9d943ad75f529ba0b8529aa1c43cbe4d63d4e0f89894d5fdcab56f9.zip"
"S3Key": "955124673880e20bd4e41d523bef58eb74503a0f574604d9ef9a6bd2c84336d6.zip"
},
"Role": {
"Fn::GetAtt": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,10 @@ var CustomResourceHandler = class {
hostname: parsedUrl.hostname,
path: parsedUrl.path,
method: "PUT",
headers: { "content-type": "", "content-length": responseBody.length }
headers: {
"content-type": "",
"content-length": Buffer.byteLength(responseBody, "utf8")
}
};
return new Promise((resolve, reject) => {
try {
Expand Down Expand Up @@ -983,7 +986,7 @@ function decodeCall(call) {
try {
const parsed = JSON.parse(call);
return parsed;
} catch (e) {
} catch {
return call;
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
var defer = require('./defer.js');

// API
module.exports = async;

/**
* Runs provided callback asynchronously
* even if callback itself is not
*
* @param {function} callback - callback to invoke
* @returns {function} - augmented callback
*/
function async(callback)
{
var isAsync = false;

// check if async happened
defer(function() { isAsync = true; });

return function async_callback(err, result)
{
if (isAsync)
{
callback(err, result);
}
else
{
defer(function nextTick_callback()
{
callback(err, result);
});
}
};
}
Loading

0 comments on commit 20feb70

Please sign in to comment.