Skip to content

Commit

Permalink
integ test
Browse files Browse the repository at this point in the history
  • Loading branch information
Rizxcviii committed Sep 11, 2023
1 parent 45ea77c commit 447acb9
Show file tree
Hide file tree
Showing 12 changed files with 594 additions and 199 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"version": "34.0.0",
"files": {
"84e0753dbcfc1fd4c21499f0bad1d34eee7e6a23678af76661541de677da38e8": {
"source": {
"path": "aws-cdk-glue.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "84e0753dbcfc1fd4c21499f0bad1d34eee7e6a23678af76661541de677da38e8.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,122 @@
{
"Resources": {
"MyDatabase1E2517DB": {
"Type": "AWS::Glue::Database",
"Properties": {
"CatalogId": {
"Ref": "AWS::AccountId"
},
"DatabaseInput": {
"Name": "my_database"
}
}
},
"MyConnection5621880D": {
"Type": "AWS::Glue::Connection",
"Properties": {
"CatalogId": {
"Ref": "AWS::AccountId"
},
"ConnectionInput": {
"ConnectionProperties": {
"JDBC_CONNECTION_URL": "jdbc:mysql://mysql.example.com:3306",
"USERNAME": "username",
"PASSWORD": "password"
},
"ConnectionType": "JDBC",
"Name": "my_connection"
}
}
},
"MyTableWithCustomLocationTable43A19D42": {
"Type": "AWS::Glue::Table",
"Properties": {
"CatalogId": {
"Ref": "AWS::AccountId"
},
"DatabaseName": {
"Ref": "MyDatabase1E2517DB"
},
"TableInput": {
"Description": "custom_location_table generated by CDK",
"Name": "custom_location_table",
"Parameters": {
"classification": "json",
"has_encrypted_data": true,
"connectionName": {
"Ref": "MyConnection5621880D"
}
},
"StorageDescriptor": {
"Columns": [
{
"Name": "col1",
"Type": "string"
},
{
"Comment": "col2 comment",
"Name": "col2",
"Type": "string"
},
{
"Name": "col3",
"Type": "array<string>"
},
{
"Name": "col4",
"Type": "map<string,string>"
},
{
"Name": "col5",
"Type": "struct<col1:string>"
}
],
"Compressed": false,
"InputFormat": "org.apache.hadoop.mapred.TextInputFormat",
"Location": "default_db.public.test",
"OutputFormat": "org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat",
"SerdeInfo": {
"SerializationLibrary": "org.openx.data.jsonserde.JsonSerDe"
},
"StoredAsSubDirectories": false
},
"TableType": "EXTERNAL_TABLE"
}
}
}
},
"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
@@ -0,0 +1,19 @@
{
"version": "34.0.0",
"files": {
"21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
"source": {
"path": "awscdkgluetableintegDefaultTestDeployAssert8BFB5B70.template.json",
"packaging": "file"
},
"destinations": {
"current_account-current_region": {
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
"objectKey": "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.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,36 @@
{
"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
@@ -0,0 +1 @@
{"version":"34.0.0"}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": "34.0.0",
"testCases": {
"aws-cdk-glue-table-integ/DefaultTest": {
"stacks": [
"aws-cdk-glue"
],
"assertionStack": "aws-cdk-glue-table-integ/DefaultTest/DeployAssert",
"assertionStackName": "awscdkgluetableintegDefaultTestDeployAssert8BFB5B70"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
{
"version": "34.0.0",
"artifacts": {
"aws-cdk-glue.assets": {
"type": "cdk:asset-manifest",
"properties": {
"file": "aws-cdk-glue.assets.json",
"requiresBootstrapStackVersion": 6,
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
}
},
"aws-cdk-glue": {
"type": "aws:cloudformation:stack",
"environment": "aws://unknown-account/unknown-region",
"properties": {
"templateFile": "aws-cdk-glue.template.json",
"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}/84e0753dbcfc1fd4c21499f0bad1d34eee7e6a23678af76661541de677da38e8.json",
"requiresBootstrapStackVersion": 6,
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
"additionalDependencies": [
"aws-cdk-glue.assets"
],
"lookupRole": {
"arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}",
"requiresBootstrapStackVersion": 8,
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
}
},
"dependencies": [
"aws-cdk-glue.assets"
],
"metadata": {
"/aws-cdk-glue/MyDatabase/Resource": [
{
"type": "aws:cdk:logicalId",
"data": "MyDatabase1E2517DB"
}
],
"/aws-cdk-glue/MyConnection/Resource": [
{
"type": "aws:cdk:logicalId",
"data": "MyConnection5621880D"
}
],
"/aws-cdk-glue/MyTableWithCustomLocation/Table": [
{
"type": "aws:cdk:logicalId",
"data": "MyTableWithCustomLocationTable43A19D42"
}
],
"/aws-cdk-glue/BootstrapVersion": [
{
"type": "aws:cdk:logicalId",
"data": "BootstrapVersion"
}
],
"/aws-cdk-glue/CheckBootstrapVersion": [
{
"type": "aws:cdk:logicalId",
"data": "CheckBootstrapVersion"
}
]
},
"displayName": "aws-cdk-glue"
},
"awscdkgluetableintegDefaultTestDeployAssert8BFB5B70.assets": {
"type": "cdk:asset-manifest",
"properties": {
"file": "awscdkgluetableintegDefaultTestDeployAssert8BFB5B70.assets.json",
"requiresBootstrapStackVersion": 6,
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
}
},
"awscdkgluetableintegDefaultTestDeployAssert8BFB5B70": {
"type": "aws:cloudformation:stack",
"environment": "aws://unknown-account/unknown-region",
"properties": {
"templateFile": "awscdkgluetableintegDefaultTestDeployAssert8BFB5B70.template.json",
"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}/21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22.json",
"requiresBootstrapStackVersion": 6,
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version",
"additionalDependencies": [
"awscdkgluetableintegDefaultTestDeployAssert8BFB5B70.assets"
],
"lookupRole": {
"arn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-lookup-role-${AWS::AccountId}-${AWS::Region}",
"requiresBootstrapStackVersion": 8,
"bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
}
},
"dependencies": [
"awscdkgluetableintegDefaultTestDeployAssert8BFB5B70.assets"
],
"metadata": {
"/aws-cdk-glue-table-integ/DefaultTest/DeployAssert/BootstrapVersion": [
{
"type": "aws:cdk:logicalId",
"data": "BootstrapVersion"
}
],
"/aws-cdk-glue-table-integ/DefaultTest/DeployAssert/CheckBootstrapVersion": [
{
"type": "aws:cdk:logicalId",
"data": "CheckBootstrapVersion"
}
]
},
"displayName": "aws-cdk-glue-table-integ/DefaultTest/DeployAssert"
},
"Tree": {
"type": "cdk:tree",
"properties": {
"file": "tree.json"
}
}
}
}
Loading

0 comments on commit 447acb9

Please sign in to comment.