From 099e8ab0e6fc4100f84c36e76ad28d3db7d8c689 Mon Sep 17 00:00:00 2001 From: Deepu Mohan Puthrote Date: Sun, 14 Jan 2024 14:38:15 +0000 Subject: [PATCH] add integration test snapshots --- ...efaultTestDeployAssert2BBB51F2.assets.json | 19 ++ ...aultTestDeployAssert2BBB51F2.template.json | 36 ++++ .../OidcProviderIntegStack.assets.json | 19 ++ .../OidcProviderIntegStack.template.json | 103 ++++++++++ .../integ.oidc-provider2.js.snapshot/cdk.out | 1 + .../integ.json | 13 ++ .../manifest.json | 143 +++++++++++++ .../tree.json | 192 ++++++++++++++++++ 8 files changed, 526 insertions(+) create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.oidc-provider2.js.snapshot/OidcProviderIntegDefaultTestDeployAssert2BBB51F2.assets.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.oidc-provider2.js.snapshot/OidcProviderIntegDefaultTestDeployAssert2BBB51F2.template.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.oidc-provider2.js.snapshot/OidcProviderIntegStack.assets.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.oidc-provider2.js.snapshot/OidcProviderIntegStack.template.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.oidc-provider2.js.snapshot/cdk.out create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.oidc-provider2.js.snapshot/integ.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.oidc-provider2.js.snapshot/manifest.json create mode 100644 packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.oidc-provider2.js.snapshot/tree.json diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.oidc-provider2.js.snapshot/OidcProviderIntegDefaultTestDeployAssert2BBB51F2.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.oidc-provider2.js.snapshot/OidcProviderIntegDefaultTestDeployAssert2BBB51F2.assets.json new file mode 100644 index 0000000000000..47868a2011fbe --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.oidc-provider2.js.snapshot/OidcProviderIntegDefaultTestDeployAssert2BBB51F2.assets.json @@ -0,0 +1,19 @@ +{ + "version": "36.0.0", + "files": { + "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": { + "source": { + "path": "OidcProviderIntegDefaultTestDeployAssert2BBB51F2.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": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.oidc-provider2.js.snapshot/OidcProviderIntegDefaultTestDeployAssert2BBB51F2.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.oidc-provider2.js.snapshot/OidcProviderIntegDefaultTestDeployAssert2BBB51F2.template.json new file mode 100644 index 0000000000000..ad9d0fb73d1dd --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.oidc-provider2.js.snapshot/OidcProviderIntegDefaultTestDeployAssert2BBB51F2.template.json @@ -0,0 +1,36 @@ +{ + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "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." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.oidc-provider2.js.snapshot/OidcProviderIntegStack.assets.json b/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.oidc-provider2.js.snapshot/OidcProviderIntegStack.assets.json new file mode 100644 index 0000000000000..326371636d91e --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.oidc-provider2.js.snapshot/OidcProviderIntegStack.assets.json @@ -0,0 +1,19 @@ +{ + "version": "36.0.0", + "files": { + "e40bdaff510d57b730ef01d0b8b96de982cb3f99015cc6cdab2ba232174b610a": { + "source": { + "path": "OidcProviderIntegStack.template.json", + "packaging": "file" + }, + "destinations": { + "current_account-current_region": { + "bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}", + "objectKey": "e40bdaff510d57b730ef01d0b8b96de982cb3f99015cc6cdab2ba232174b610a.json", + "assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}" + } + } + } + }, + "dockerImages": {} +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.oidc-provider2.js.snapshot/OidcProviderIntegStack.template.json b/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.oidc-provider2.js.snapshot/OidcProviderIntegStack.template.json new file mode 100644 index 0000000000000..cbdb5abedcd05 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.oidc-provider2.js.snapshot/OidcProviderIntegStack.template.json @@ -0,0 +1,103 @@ +{ + "Resources": { + "Provider2281708E": { + "Type": "AWS::IAM::OIDCProvider", + "Properties": { + "ClientIdList": [ + "foo", + "bar" + ], + "ThumbprintList": [ + "aa00aa1122aa00aa1122aa00aa1122aa00aa1122", + "aa00aa1122aa00aa1122aa00aa1122aa00aa1111" + ], + "Url": "https://oidc.eks.us-east-1.amazonaws.com/id/test1" + } + }, + "Minimal107EFE55": { + "Type": "AWS::IAM::OIDCProvider", + "Properties": { + "ThumbprintList": [ + "aa00aa1122aa00aa1122aa00aa1122aa00aa1122" + ], + "Url": "https://oidc.eks.us-east-1.amazonaws.com/id/test2" + } + } + }, + "Outputs": { + "Arn": { + "Value": { + "Ref": "Provider2281708E" + } + }, + "Issuer": { + "Value": { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + ":oidc-provider/", + { + "Ref": "Provider2281708E" + } + ] + } + ] + } + }, + "MinimalArn": { + "Value": { + "Ref": "Minimal107EFE55" + } + }, + "MinimalIssuer": { + "Value": { + "Fn::Select": [ + 1, + { + "Fn::Split": [ + ":oidc-provider/", + { + "Ref": "Minimal107EFE55" + } + ] + } + ] + } + } + }, + "Parameters": { + "BootstrapVersion": { + "Type": "AWS::SSM::Parameter::Value", + "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." + } + ] + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.oidc-provider2.js.snapshot/cdk.out b/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.oidc-provider2.js.snapshot/cdk.out new file mode 100644 index 0000000000000..1f0068d32659a --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.oidc-provider2.js.snapshot/cdk.out @@ -0,0 +1 @@ +{"version":"36.0.0"} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.oidc-provider2.js.snapshot/integ.json b/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.oidc-provider2.js.snapshot/integ.json new file mode 100644 index 0000000000000..f987b83d7f6f1 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.oidc-provider2.js.snapshot/integ.json @@ -0,0 +1,13 @@ +{ + "version": "36.0.0", + "testCases": { + "OidcProviderInteg/DefaultTest": { + "stacks": [ + "OidcProviderIntegStack" + ], + "diffAssets": true, + "assertionStack": "OidcProviderInteg/DefaultTest/DeployAssert", + "assertionStackName": "OidcProviderIntegDefaultTestDeployAssert2BBB51F2" + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.oidc-provider2.js.snapshot/manifest.json b/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.oidc-provider2.js.snapshot/manifest.json new file mode 100644 index 0000000000000..817fbc41c7d33 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.oidc-provider2.js.snapshot/manifest.json @@ -0,0 +1,143 @@ +{ + "version": "36.0.0", + "artifacts": { + "OidcProviderIntegStack.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "OidcProviderIntegStack.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "OidcProviderIntegStack": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "OidcProviderIntegStack.template.json", + "terminationProtection": false, + "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}/e40bdaff510d57b730ef01d0b8b96de982cb3f99015cc6cdab2ba232174b610a.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version", + "additionalDependencies": [ + "OidcProviderIntegStack.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": [ + "OidcProviderIntegStack.assets" + ], + "metadata": { + "/OidcProviderIntegStack/Provider/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Provider2281708E" + } + ], + "/OidcProviderIntegStack/Minimal/Resource": [ + { + "type": "aws:cdk:logicalId", + "data": "Minimal107EFE55" + } + ], + "/OidcProviderIntegStack/Arn": [ + { + "type": "aws:cdk:logicalId", + "data": "Arn" + } + ], + "/OidcProviderIntegStack/Issuer": [ + { + "type": "aws:cdk:logicalId", + "data": "Issuer" + } + ], + "/OidcProviderIntegStack/MinimalArn": [ + { + "type": "aws:cdk:logicalId", + "data": "MinimalArn" + } + ], + "/OidcProviderIntegStack/MinimalIssuer": [ + { + "type": "aws:cdk:logicalId", + "data": "MinimalIssuer" + } + ], + "/OidcProviderIntegStack/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/OidcProviderIntegStack/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "OidcProviderIntegStack" + }, + "OidcProviderIntegDefaultTestDeployAssert2BBB51F2.assets": { + "type": "cdk:asset-manifest", + "properties": { + "file": "OidcProviderIntegDefaultTestDeployAssert2BBB51F2.assets.json", + "requiresBootstrapStackVersion": 6, + "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version" + } + }, + "OidcProviderIntegDefaultTestDeployAssert2BBB51F2": { + "type": "aws:cloudformation:stack", + "environment": "aws://unknown-account/unknown-region", + "properties": { + "templateFile": "OidcProviderIntegDefaultTestDeployAssert2BBB51F2.template.json", + "terminationProtection": false, + "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": [ + "OidcProviderIntegDefaultTestDeployAssert2BBB51F2.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": [ + "OidcProviderIntegDefaultTestDeployAssert2BBB51F2.assets" + ], + "metadata": { + "/OidcProviderInteg/DefaultTest/DeployAssert/BootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "BootstrapVersion" + } + ], + "/OidcProviderInteg/DefaultTest/DeployAssert/CheckBootstrapVersion": [ + { + "type": "aws:cdk:logicalId", + "data": "CheckBootstrapVersion" + } + ] + }, + "displayName": "OidcProviderInteg/DefaultTest/DeployAssert" + }, + "Tree": { + "type": "cdk:tree", + "properties": { + "file": "tree.json" + } + } + } +} \ No newline at end of file diff --git a/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.oidc-provider2.js.snapshot/tree.json b/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.oidc-provider2.js.snapshot/tree.json new file mode 100644 index 0000000000000..48f9648d95f78 --- /dev/null +++ b/packages/@aws-cdk-testing/framework-integ/test/aws-iam/test/integ.oidc-provider2.js.snapshot/tree.json @@ -0,0 +1,192 @@ +{ + "version": "tree-0.1", + "tree": { + "id": "App", + "path": "", + "children": { + "OidcProviderIntegStack": { + "id": "OidcProviderIntegStack", + "path": "OidcProviderIntegStack", + "children": { + "Provider": { + "id": "Provider", + "path": "OidcProviderIntegStack/Provider", + "children": { + "Resource": { + "id": "Resource", + "path": "OidcProviderIntegStack/Provider/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::OIDCProvider", + "aws:cdk:cloudformation:props": { + "clientIdList": [ + "foo", + "bar" + ], + "thumbprintList": [ + "aa00aa1122aa00aa1122aa00aa1122aa00aa1122", + "aa00aa1122aa00aa1122aa00aa1122aa00aa1111" + ], + "url": "https://oidc.eks.us-east-1.amazonaws.com/id/test1" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnOIDCProvider", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.OpenIdConnectProvider2", + "version": "0.0.0" + } + }, + "Minimal": { + "id": "Minimal", + "path": "OidcProviderIntegStack/Minimal", + "children": { + "Resource": { + "id": "Resource", + "path": "OidcProviderIntegStack/Minimal/Resource", + "attributes": { + "aws:cdk:cloudformation:type": "AWS::IAM::OIDCProvider", + "aws:cdk:cloudformation:props": { + "thumbprintList": [ + "aa00aa1122aa00aa1122aa00aa1122aa00aa1122" + ], + "url": "https://oidc.eks.us-east-1.amazonaws.com/id/test2" + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.CfnOIDCProvider", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.aws_iam.OpenIdConnectProvider2", + "version": "0.0.0" + } + }, + "Arn": { + "id": "Arn", + "path": "OidcProviderIntegStack/Arn", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnOutput", + "version": "0.0.0" + } + }, + "Issuer": { + "id": "Issuer", + "path": "OidcProviderIntegStack/Issuer", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnOutput", + "version": "0.0.0" + } + }, + "MinimalArn": { + "id": "MinimalArn", + "path": "OidcProviderIntegStack/MinimalArn", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnOutput", + "version": "0.0.0" + } + }, + "MinimalIssuer": { + "id": "MinimalIssuer", + "path": "OidcProviderIntegStack/MinimalIssuer", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnOutput", + "version": "0.0.0" + } + }, + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "OidcProviderIntegStack/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "OidcProviderIntegStack/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + }, + "OidcProviderInteg": { + "id": "OidcProviderInteg", + "path": "OidcProviderInteg", + "children": { + "DefaultTest": { + "id": "DefaultTest", + "path": "OidcProviderInteg/DefaultTest", + "children": { + "Default": { + "id": "Default", + "path": "OidcProviderInteg/DefaultTest/Default", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + }, + "DeployAssert": { + "id": "DeployAssert", + "path": "OidcProviderInteg/DefaultTest/DeployAssert", + "children": { + "BootstrapVersion": { + "id": "BootstrapVersion", + "path": "OidcProviderInteg/DefaultTest/DeployAssert/BootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnParameter", + "version": "0.0.0" + } + }, + "CheckBootstrapVersion": { + "id": "CheckBootstrapVersion", + "path": "OidcProviderInteg/DefaultTest/DeployAssert/CheckBootstrapVersion", + "constructInfo": { + "fqn": "aws-cdk-lib.CfnRule", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.Stack", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase", + "version": "0.0.0" + } + } + }, + "constructInfo": { + "fqn": "@aws-cdk/integ-tests-alpha.IntegTest", + "version": "0.0.0" + } + }, + "Tree": { + "id": "Tree", + "path": "Tree", + "constructInfo": { + "fqn": "constructs.Construct", + "version": "10.3.0" + } + } + }, + "constructInfo": { + "fqn": "aws-cdk-lib.App", + "version": "0.0.0" + } + } +} \ No newline at end of file