Skip to content

Instantly share code, notes, and snippets.

@mrgrain
Created October 19, 2022 16:20
Show Gist options
  • Save mrgrain/c6b3b94402df71319ee2f61f9fd65704 to your computer and use it in GitHub Desktop.
Save mrgrain/c6b3b94402df71319ee2f61f9fd65704 to your computer and use it in GitHub Desktop.
From 7a780eed2b9020ccf67e0797e746c9a904370fc4 Mon Sep 17 00:00:00 2001
From: Momo Kornher <mail@moritzkornher.de>
Date: Wed, 19 Oct 2022 17:16:00 +0100
Subject: [PATCH] feat: csharp & fsharp
---
.../lib/runner/integration-tests.ts | 4 +-
.../integ-runner/lib/runner/runner-base.ts | 4 +-
.../test/test-data-csharp/.gitignore | 11 ++
.../test/test-data-csharp/IntegTestCsharp.cs | 20 ++++
.../test-data-csharp/IntegTestCsharp.csproj | 14 +++
.../CsharpAppStack.assets.json | 19 ++++
.../CsharpAppStack.template.json | 36 ++++++
...efaultTestDeployAssertE3E7D2A4.assets.json | 19 ++++
...aultTestDeployAssertE3E7D2A4.template.json | 36 ++++++
.../TestCsharp.integ.snapshot/cdk.out | 1 +
.../TestCsharp.integ.snapshot/integ.json | 12 ++
.../TestCsharp.integ.snapshot/manifest.json | 105 ++++++++++++++++++
.../TestCsharp.integ.snapshot/tree.json | 65 +++++++++++
.../test/test-data-fsharp/.gitignore | 11 ++
.../test/test-data-fsharp/IntegTestFsharp.fs | 15 +++
.../test-data-fsharp/IntegTestFsharp.fsproj | 18 +++
.../FsharpAppStack.assets.json | 19 ++++
.../FsharpAppStack.template.json | 36 ++++++
...efaultTestDeployAssertE3E7D2A4.assets.json | 19 ++++
...aultTestDeployAssertE3E7D2A4.template.json | 36 ++++++
.../TestFsharp.integ.snapshot/cdk.out | 1 +
.../TestFsharp.integ.snapshot/integ.json | 12 ++
.../TestFsharp.integ.snapshot/manifest.json | 105 ++++++++++++++++++
.../TestFsharp.integ.snapshot/tree.json | 65 +++++++++++
24 files changed, 679 insertions(+), 4 deletions(-)
create mode 100644 packages/@aws-cdk/integ-runner/test/test-data-csharp/.gitignore
create mode 100644 packages/@aws-cdk/integ-runner/test/test-data-csharp/IntegTestCsharp.cs
create mode 100644 packages/@aws-cdk/integ-runner/test/test-data-csharp/IntegTestCsharp.csproj
create mode 100644 packages/@aws-cdk/integ-runner/test/test-data-csharp/TestCsharp.integ.snapshot/CsharpAppStack.assets.json
create mode 100644 packages/@aws-cdk/integ-runner/test/test-data-csharp/TestCsharp.integ.snapshot/CsharpAppStack.template.json
create mode 100644 packages/@aws-cdk/integ-runner/test/test-data-csharp/TestCsharp.integ.snapshot/IntegTestDefaultTestDeployAssertE3E7D2A4.assets.json
create mode 100644 packages/@aws-cdk/integ-runner/test/test-data-csharp/TestCsharp.integ.snapshot/IntegTestDefaultTestDeployAssertE3E7D2A4.template.json
create mode 100644 packages/@aws-cdk/integ-runner/test/test-data-csharp/TestCsharp.integ.snapshot/cdk.out
create mode 100644 packages/@aws-cdk/integ-runner/test/test-data-csharp/TestCsharp.integ.snapshot/integ.json
create mode 100644 packages/@aws-cdk/integ-runner/test/test-data-csharp/TestCsharp.integ.snapshot/manifest.json
create mode 100644 packages/@aws-cdk/integ-runner/test/test-data-csharp/TestCsharp.integ.snapshot/tree.json
create mode 100644 packages/@aws-cdk/integ-runner/test/test-data-fsharp/.gitignore
create mode 100644 packages/@aws-cdk/integ-runner/test/test-data-fsharp/IntegTestFsharp.fs
create mode 100644 packages/@aws-cdk/integ-runner/test/test-data-fsharp/IntegTestFsharp.fsproj
create mode 100644 packages/@aws-cdk/integ-runner/test/test-data-fsharp/TestFsharp.integ.snapshot/FsharpAppStack.assets.json
create mode 100644 packages/@aws-cdk/integ-runner/test/test-data-fsharp/TestFsharp.integ.snapshot/FsharpAppStack.template.json
create mode 100644 packages/@aws-cdk/integ-runner/test/test-data-fsharp/TestFsharp.integ.snapshot/IntegTestDefaultTestDeployAssertE3E7D2A4.assets.json
create mode 100644 packages/@aws-cdk/integ-runner/test/test-data-fsharp/TestFsharp.integ.snapshot/IntegTestDefaultTestDeployAssertE3E7D2A4.template.json
create mode 100644 packages/@aws-cdk/integ-runner/test/test-data-fsharp/TestFsharp.integ.snapshot/cdk.out
create mode 100644 packages/@aws-cdk/integ-runner/test/test-data-fsharp/TestFsharp.integ.snapshot/integ.json
create mode 100644 packages/@aws-cdk/integ-runner/test/test-data-fsharp/TestFsharp.integ.snapshot/manifest.json
create mode 100644 packages/@aws-cdk/integ-runner/test/test-data-fsharp/TestFsharp.integ.snapshot/tree.json
diff --git a/packages/@aws-cdk/integ-runner/lib/runner/integration-tests.ts b/packages/@aws-cdk/integ-runner/lib/runner/integration-tests.ts
index a970ee1603..15e0071292 100644
--- a/packages/@aws-cdk/integ-runner/lib/runner/integration-tests.ts
+++ b/packages/@aws-cdk/integ-runner/lib/runner/integration-tests.ts
@@ -174,8 +174,8 @@ export class IntegrationTests {
['typescript', new RegExp(/^integ\./)],
]);
private readonly suffixMapping: Map<string, RegExp> = new Map<string, RegExp>([
- ['csharp', new RegExp(/\.cs$/)],
- ['fsharp', new RegExp(/\.fs$/)],
+ ['csharp', new RegExp(/\.csproj$/)],
+ ['fsharp', new RegExp(/\.fsproj$/)],
['go', new RegExp(/\.go$/)],
['java', new RegExp(/\.java$/)],
['javascript', new RegExp(/\.js$/)],
diff --git a/packages/@aws-cdk/integ-runner/lib/runner/runner-base.ts b/packages/@aws-cdk/integ-runner/lib/runner/runner-base.ts
index 1e725f86d1..3c22d84797 100644
--- a/packages/@aws-cdk/integ-runner/lib/runner/runner-base.ts
+++ b/packages/@aws-cdk/integ-runner/lib/runner/runner-base.ts
@@ -200,8 +200,8 @@ export abstract class IntegRunner {
['typescript', 'node -r ts-node/register {filePath}'],
['python', `${pythonExecutable()} {filePath}`],
['go', 'go mod download && go run {filePath}'],
- ['csharp', 'dotnet run {filePath}'],
- ['fsharp', 'dotnet run {filePath}'],
+ ['csharp', 'dotnet run --project {filePath}'],
+ ['fsharp', 'dotnet run --project {filePath}'],
['java', `mvn -f ${IntegRunner.getJavaPomPath(path.dirname(options.test.absoluteFileName))} -e -q compile exec:java clean -Dexec.mainClass=${IntegRunner.getJavaClassPath(options.test.absoluteFileName)}`],
]);
const testRunCommand = options.appCommand ?? defaultAppCommands.get(this.test.language);
diff --git a/packages/@aws-cdk/integ-runner/test/test-data-csharp/.gitignore b/packages/@aws-cdk/integ-runner/test/test-data-csharp/.gitignore
new file mode 100644
index 0000000000..be2c146984
--- /dev/null
+++ b/packages/@aws-cdk/integ-runner/test/test-data-csharp/.gitignore
@@ -0,0 +1,11 @@
+# Created by https://www.gitignore.io/api/csharp
+[Dd]ebug/
+[Dd]ebugPublic/
+[Rr]elease/
+[Rr]eleases/
+x64/
+x86/
+bld/
+[Bb]in/
+[Oo]bj/
+[Ll]og/
\ No newline at end of file
diff --git a/packages/@aws-cdk/integ-runner/test/test-data-csharp/IntegTestCsharp.cs b/packages/@aws-cdk/integ-runner/test/test-data-csharp/IntegTestCsharp.cs
new file mode 100644
index 0000000000..4fe4d6e3f8
--- /dev/null
+++ b/packages/@aws-cdk/integ-runner/test/test-data-csharp/IntegTestCsharp.cs
@@ -0,0 +1,20 @@
+using Amazon.CDK;
+using Amazon.CDK.IntegTests.Alpha;
+
+namespace IntegTestCsharp
+{
+ sealed class Program
+ {
+ public static void Main(string[] args)
+ {
+ App app = new App();
+ Stack stack = new Stack(app, "CsharpAppStack", new StackProps{});
+
+ new IntegTest(app, "IntegTest", new IntegTestProps{
+ TestCases = new [] { stack }
+ });
+
+ app.Synth();
+ }
+ }
+}
diff --git a/packages/@aws-cdk/integ-runner/test/test-data-csharp/IntegTestCsharp.csproj b/packages/@aws-cdk/integ-runner/test/test-data-csharp/IntegTestCsharp.csproj
new file mode 100644
index 0000000000..d498deb77a
--- /dev/null
+++ b/packages/@aws-cdk/integ-runner/test/test-data-csharp/IntegTestCsharp.csproj
@@ -0,0 +1,14 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp3.1</TargetFramework>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <PackageReference Include="Amazon.CDK.IntegTests.Alpha" Version="2.43.1-alpha.0" />
+ <PackageReference Include="Amazon.CDK.Lib" Version="2.43.1" />
+ <PackageReference Include="Constructs" Version="[10.0.0,11.0.0)" />
+ </ItemGroup>
+
+</Project>
\ No newline at end of file
diff --git a/packages/@aws-cdk/integ-runner/test/test-data-csharp/TestCsharp.integ.snapshot/CsharpAppStack.assets.json b/packages/@aws-cdk/integ-runner/test/test-data-csharp/TestCsharp.integ.snapshot/CsharpAppStack.assets.json
new file mode 100644
index 0000000000..f3ffce6082
--- /dev/null
+++ b/packages/@aws-cdk/integ-runner/test/test-data-csharp/TestCsharp.integ.snapshot/CsharpAppStack.assets.json
@@ -0,0 +1,19 @@
+{
+ "version": "21.0.0",
+ "files": {
+ "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
+ "source": {
+ "path": "CsharpAppStack.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/integ-runner/test/test-data-csharp/TestCsharp.integ.snapshot/CsharpAppStack.template.json b/packages/@aws-cdk/integ-runner/test/test-data-csharp/TestCsharp.integ.snapshot/CsharpAppStack.template.json
new file mode 100644
index 0000000000..ad9d0fb73d
--- /dev/null
+++ b/packages/@aws-cdk/integ-runner/test/test-data-csharp/TestCsharp.integ.snapshot/CsharpAppStack.template.json
@@ -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."
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/packages/@aws-cdk/integ-runner/test/test-data-csharp/TestCsharp.integ.snapshot/IntegTestDefaultTestDeployAssertE3E7D2A4.assets.json b/packages/@aws-cdk/integ-runner/test/test-data-csharp/TestCsharp.integ.snapshot/IntegTestDefaultTestDeployAssertE3E7D2A4.assets.json
new file mode 100644
index 0000000000..f1a05d4513
--- /dev/null
+++ b/packages/@aws-cdk/integ-runner/test/test-data-csharp/TestCsharp.integ.snapshot/IntegTestDefaultTestDeployAssertE3E7D2A4.assets.json
@@ -0,0 +1,19 @@
+{
+ "version": "21.0.0",
+ "files": {
+ "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
+ "source": {
+ "path": "IntegTestDefaultTestDeployAssertE3E7D2A4.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/integ-runner/test/test-data-csharp/TestCsharp.integ.snapshot/IntegTestDefaultTestDeployAssertE3E7D2A4.template.json b/packages/@aws-cdk/integ-runner/test/test-data-csharp/TestCsharp.integ.snapshot/IntegTestDefaultTestDeployAssertE3E7D2A4.template.json
new file mode 100644
index 0000000000..ad9d0fb73d
--- /dev/null
+++ b/packages/@aws-cdk/integ-runner/test/test-data-csharp/TestCsharp.integ.snapshot/IntegTestDefaultTestDeployAssertE3E7D2A4.template.json
@@ -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."
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/packages/@aws-cdk/integ-runner/test/test-data-csharp/TestCsharp.integ.snapshot/cdk.out b/packages/@aws-cdk/integ-runner/test/test-data-csharp/TestCsharp.integ.snapshot/cdk.out
new file mode 100644
index 0000000000..8ecc185e9d
--- /dev/null
+++ b/packages/@aws-cdk/integ-runner/test/test-data-csharp/TestCsharp.integ.snapshot/cdk.out
@@ -0,0 +1 @@
+{"version":"21.0.0"}
\ No newline at end of file
diff --git a/packages/@aws-cdk/integ-runner/test/test-data-csharp/TestCsharp.integ.snapshot/integ.json b/packages/@aws-cdk/integ-runner/test/test-data-csharp/TestCsharp.integ.snapshot/integ.json
new file mode 100644
index 0000000000..7b7d66591e
--- /dev/null
+++ b/packages/@aws-cdk/integ-runner/test/test-data-csharp/TestCsharp.integ.snapshot/integ.json
@@ -0,0 +1,12 @@
+{
+ "version": "21.0.0",
+ "testCases": {
+ "IntegTest/DefaultTest": {
+ "stacks": [
+ "CsharpAppStack"
+ ],
+ "assertionStack": "IntegTest/DefaultTest/DeployAssert",
+ "assertionStackName": "IntegTestDefaultTestDeployAssertE3E7D2A4"
+ }
+ }
+}
\ No newline at end of file
diff --git a/packages/@aws-cdk/integ-runner/test/test-data-csharp/TestCsharp.integ.snapshot/manifest.json b/packages/@aws-cdk/integ-runner/test/test-data-csharp/TestCsharp.integ.snapshot/manifest.json
new file mode 100644
index 0000000000..38a073f5a2
--- /dev/null
+++ b/packages/@aws-cdk/integ-runner/test/test-data-csharp/TestCsharp.integ.snapshot/manifest.json
@@ -0,0 +1,105 @@
+{
+ "version": "21.0.0",
+ "artifacts": {
+ "Tree": {
+ "type": "cdk:tree",
+ "properties": {
+ "file": "tree.json"
+ }
+ },
+ "CsharpAppStack.assets": {
+ "type": "cdk:asset-manifest",
+ "properties": {
+ "file": "CsharpAppStack.assets.json",
+ "requiresBootstrapStackVersion": 6,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
+ }
+ },
+ "CsharpAppStack": {
+ "type": "aws:cloudformation:stack",
+ "environment": "aws://unknown-account/unknown-region",
+ "properties": {
+ "templateFile": "CsharpAppStack.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": [
+ "CsharpAppStack.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": [
+ "CsharpAppStack.assets"
+ ],
+ "metadata": {
+ "/CsharpAppStack/BootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "BootstrapVersion"
+ }
+ ],
+ "/CsharpAppStack/CheckBootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "CheckBootstrapVersion"
+ }
+ ]
+ },
+ "displayName": "CsharpAppStack"
+ },
+ "IntegTestDefaultTestDeployAssertE3E7D2A4.assets": {
+ "type": "cdk:asset-manifest",
+ "properties": {
+ "file": "IntegTestDefaultTestDeployAssertE3E7D2A4.assets.json",
+ "requiresBootstrapStackVersion": 6,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
+ }
+ },
+ "IntegTestDefaultTestDeployAssertE3E7D2A4": {
+ "type": "aws:cloudformation:stack",
+ "environment": "aws://unknown-account/unknown-region",
+ "properties": {
+ "templateFile": "IntegTestDefaultTestDeployAssertE3E7D2A4.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": [
+ "IntegTestDefaultTestDeployAssertE3E7D2A4.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": [
+ "IntegTestDefaultTestDeployAssertE3E7D2A4.assets"
+ ],
+ "metadata": {
+ "/IntegTest/DefaultTest/DeployAssert/BootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "BootstrapVersion"
+ }
+ ],
+ "/IntegTest/DefaultTest/DeployAssert/CheckBootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "CheckBootstrapVersion"
+ }
+ ]
+ },
+ "displayName": "IntegTest/DefaultTest/DeployAssert"
+ }
+ }
+}
\ No newline at end of file
diff --git a/packages/@aws-cdk/integ-runner/test/test-data-csharp/TestCsharp.integ.snapshot/tree.json b/packages/@aws-cdk/integ-runner/test/test-data-csharp/TestCsharp.integ.snapshot/tree.json
new file mode 100644
index 0000000000..2c5bf1f3a0
--- /dev/null
+++ b/packages/@aws-cdk/integ-runner/test/test-data-csharp/TestCsharp.integ.snapshot/tree.json
@@ -0,0 +1,65 @@
+{
+ "version": "tree-0.1",
+ "tree": {
+ "id": "App",
+ "path": "",
+ "children": {
+ "Tree": {
+ "id": "Tree",
+ "path": "Tree",
+ "constructInfo": {
+ "fqn": "constructs.Construct",
+ "version": "10.0.0"
+ }
+ },
+ "CsharpAppStack": {
+ "id": "CsharpAppStack",
+ "path": "CsharpAppStack",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Stack",
+ "version": "2.43.1"
+ }
+ },
+ "IntegTest": {
+ "id": "IntegTest",
+ "path": "IntegTest",
+ "children": {
+ "DefaultTest": {
+ "id": "DefaultTest",
+ "path": "IntegTest/DefaultTest",
+ "children": {
+ "Default": {
+ "id": "Default",
+ "path": "IntegTest/DefaultTest/Default",
+ "constructInfo": {
+ "fqn": "constructs.Construct",
+ "version": "10.0.0"
+ }
+ },
+ "DeployAssert": {
+ "id": "DeployAssert",
+ "path": "IntegTest/DefaultTest/DeployAssert",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Stack",
+ "version": "2.43.1"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase",
+ "version": "2.43.1-alpha.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/integ-tests-alpha.IntegTest",
+ "version": "2.43.1-alpha.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.App",
+ "version": "2.43.1"
+ }
+ }
+}
\ No newline at end of file
diff --git a/packages/@aws-cdk/integ-runner/test/test-data-fsharp/.gitignore b/packages/@aws-cdk/integ-runner/test/test-data-fsharp/.gitignore
new file mode 100644
index 0000000000..be2c146984
--- /dev/null
+++ b/packages/@aws-cdk/integ-runner/test/test-data-fsharp/.gitignore
@@ -0,0 +1,11 @@
+# Created by https://www.gitignore.io/api/csharp
+[Dd]ebug/
+[Dd]ebugPublic/
+[Rr]elease/
+[Rr]eleases/
+x64/
+x86/
+bld/
+[Bb]in/
+[Oo]bj/
+[Ll]og/
\ No newline at end of file
diff --git a/packages/@aws-cdk/integ-runner/test/test-data-fsharp/IntegTestFsharp.fs b/packages/@aws-cdk/integ-runner/test/test-data-fsharp/IntegTestFsharp.fs
new file mode 100644
index 0000000000..b460ef3e17
--- /dev/null
+++ b/packages/@aws-cdk/integ-runner/test/test-data-fsharp/IntegTestFsharp.fs
@@ -0,0 +1,15 @@
+open Amazon.CDK
+open Amazon.CDK.IntegTests.Alpha;
+
+[<EntryPoint>]
+let main _ =
+ let app = App(null)
+ let stack = Stack(app, "FsharpAppStack", StackProps())
+
+ let integTestProps =
+ IntegTestProps(
+ TestCases = [| stack |])
+ IntegTest(app, "IntegTest", integTestProps) |> ignore
+
+ app.Synth() |> ignore
+ 0
diff --git a/packages/@aws-cdk/integ-runner/test/test-data-fsharp/IntegTestFsharp.fsproj b/packages/@aws-cdk/integ-runner/test/test-data-fsharp/IntegTestFsharp.fsproj
new file mode 100644
index 0000000000..704322b644
--- /dev/null
+++ b/packages/@aws-cdk/integ-runner/test/test-data-fsharp/IntegTestFsharp.fsproj
@@ -0,0 +1,18 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp3.1</TargetFramework>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <Compile Include="IntegTestFsharp.fs" />
+ </ItemGroup>
+
+ <ItemGroup>
+ <PackageReference Include="Amazon.CDK.IntegTests.Alpha" Version="2.43.1-alpha.0" />
+ <PackageReference Include="Amazon.CDK.Lib" Version="2.43.1" />
+ <PackageReference Include="Constructs" Version="[10.0.0,11.0.0)" />
+ </ItemGroup>
+
+</Project>
\ No newline at end of file
diff --git a/packages/@aws-cdk/integ-runner/test/test-data-fsharp/TestFsharp.integ.snapshot/FsharpAppStack.assets.json b/packages/@aws-cdk/integ-runner/test/test-data-fsharp/TestFsharp.integ.snapshot/FsharpAppStack.assets.json
new file mode 100644
index 0000000000..d3e985fcec
--- /dev/null
+++ b/packages/@aws-cdk/integ-runner/test/test-data-fsharp/TestFsharp.integ.snapshot/FsharpAppStack.assets.json
@@ -0,0 +1,19 @@
+{
+ "version": "21.0.0",
+ "files": {
+ "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
+ "source": {
+ "path": "FsharpAppStack.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/integ-runner/test/test-data-fsharp/TestFsharp.integ.snapshot/FsharpAppStack.template.json b/packages/@aws-cdk/integ-runner/test/test-data-fsharp/TestFsharp.integ.snapshot/FsharpAppStack.template.json
new file mode 100644
index 0000000000..ad9d0fb73d
--- /dev/null
+++ b/packages/@aws-cdk/integ-runner/test/test-data-fsharp/TestFsharp.integ.snapshot/FsharpAppStack.template.json
@@ -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."
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/packages/@aws-cdk/integ-runner/test/test-data-fsharp/TestFsharp.integ.snapshot/IntegTestDefaultTestDeployAssertE3E7D2A4.assets.json b/packages/@aws-cdk/integ-runner/test/test-data-fsharp/TestFsharp.integ.snapshot/IntegTestDefaultTestDeployAssertE3E7D2A4.assets.json
new file mode 100644
index 0000000000..f1a05d4513
--- /dev/null
+++ b/packages/@aws-cdk/integ-runner/test/test-data-fsharp/TestFsharp.integ.snapshot/IntegTestDefaultTestDeployAssertE3E7D2A4.assets.json
@@ -0,0 +1,19 @@
+{
+ "version": "21.0.0",
+ "files": {
+ "21fbb51d7b23f6a6c262b46a9caee79d744a3ac019fd45422d988b96d44b2a22": {
+ "source": {
+ "path": "IntegTestDefaultTestDeployAssertE3E7D2A4.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/integ-runner/test/test-data-fsharp/TestFsharp.integ.snapshot/IntegTestDefaultTestDeployAssertE3E7D2A4.template.json b/packages/@aws-cdk/integ-runner/test/test-data-fsharp/TestFsharp.integ.snapshot/IntegTestDefaultTestDeployAssertE3E7D2A4.template.json
new file mode 100644
index 0000000000..ad9d0fb73d
--- /dev/null
+++ b/packages/@aws-cdk/integ-runner/test/test-data-fsharp/TestFsharp.integ.snapshot/IntegTestDefaultTestDeployAssertE3E7D2A4.template.json
@@ -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."
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/packages/@aws-cdk/integ-runner/test/test-data-fsharp/TestFsharp.integ.snapshot/cdk.out b/packages/@aws-cdk/integ-runner/test/test-data-fsharp/TestFsharp.integ.snapshot/cdk.out
new file mode 100644
index 0000000000..8ecc185e9d
--- /dev/null
+++ b/packages/@aws-cdk/integ-runner/test/test-data-fsharp/TestFsharp.integ.snapshot/cdk.out
@@ -0,0 +1 @@
+{"version":"21.0.0"}
\ No newline at end of file
diff --git a/packages/@aws-cdk/integ-runner/test/test-data-fsharp/TestFsharp.integ.snapshot/integ.json b/packages/@aws-cdk/integ-runner/test/test-data-fsharp/TestFsharp.integ.snapshot/integ.json
new file mode 100644
index 0000000000..3c3e2c1a86
--- /dev/null
+++ b/packages/@aws-cdk/integ-runner/test/test-data-fsharp/TestFsharp.integ.snapshot/integ.json
@@ -0,0 +1,12 @@
+{
+ "version": "21.0.0",
+ "testCases": {
+ "IntegTest/DefaultTest": {
+ "stacks": [
+ "FsharpAppStack"
+ ],
+ "assertionStack": "IntegTest/DefaultTest/DeployAssert",
+ "assertionStackName": "IntegTestDefaultTestDeployAssertE3E7D2A4"
+ }
+ }
+}
\ No newline at end of file
diff --git a/packages/@aws-cdk/integ-runner/test/test-data-fsharp/TestFsharp.integ.snapshot/manifest.json b/packages/@aws-cdk/integ-runner/test/test-data-fsharp/TestFsharp.integ.snapshot/manifest.json
new file mode 100644
index 0000000000..a7527a8489
--- /dev/null
+++ b/packages/@aws-cdk/integ-runner/test/test-data-fsharp/TestFsharp.integ.snapshot/manifest.json
@@ -0,0 +1,105 @@
+{
+ "version": "21.0.0",
+ "artifacts": {
+ "Tree": {
+ "type": "cdk:tree",
+ "properties": {
+ "file": "tree.json"
+ }
+ },
+ "FsharpAppStack.assets": {
+ "type": "cdk:asset-manifest",
+ "properties": {
+ "file": "FsharpAppStack.assets.json",
+ "requiresBootstrapStackVersion": 6,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
+ }
+ },
+ "FsharpAppStack": {
+ "type": "aws:cloudformation:stack",
+ "environment": "aws://unknown-account/unknown-region",
+ "properties": {
+ "templateFile": "FsharpAppStack.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": [
+ "FsharpAppStack.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": [
+ "FsharpAppStack.assets"
+ ],
+ "metadata": {
+ "/FsharpAppStack/BootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "BootstrapVersion"
+ }
+ ],
+ "/FsharpAppStack/CheckBootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "CheckBootstrapVersion"
+ }
+ ]
+ },
+ "displayName": "FsharpAppStack"
+ },
+ "IntegTestDefaultTestDeployAssertE3E7D2A4.assets": {
+ "type": "cdk:asset-manifest",
+ "properties": {
+ "file": "IntegTestDefaultTestDeployAssertE3E7D2A4.assets.json",
+ "requiresBootstrapStackVersion": 6,
+ "bootstrapStackVersionSsmParameter": "/cdk-bootstrap/hnb659fds/version"
+ }
+ },
+ "IntegTestDefaultTestDeployAssertE3E7D2A4": {
+ "type": "aws:cloudformation:stack",
+ "environment": "aws://unknown-account/unknown-region",
+ "properties": {
+ "templateFile": "IntegTestDefaultTestDeployAssertE3E7D2A4.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": [
+ "IntegTestDefaultTestDeployAssertE3E7D2A4.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": [
+ "IntegTestDefaultTestDeployAssertE3E7D2A4.assets"
+ ],
+ "metadata": {
+ "/IntegTest/DefaultTest/DeployAssert/BootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "BootstrapVersion"
+ }
+ ],
+ "/IntegTest/DefaultTest/DeployAssert/CheckBootstrapVersion": [
+ {
+ "type": "aws:cdk:logicalId",
+ "data": "CheckBootstrapVersion"
+ }
+ ]
+ },
+ "displayName": "IntegTest/DefaultTest/DeployAssert"
+ }
+ }
+}
\ No newline at end of file
diff --git a/packages/@aws-cdk/integ-runner/test/test-data-fsharp/TestFsharp.integ.snapshot/tree.json b/packages/@aws-cdk/integ-runner/test/test-data-fsharp/TestFsharp.integ.snapshot/tree.json
new file mode 100644
index 0000000000..e938c9b768
--- /dev/null
+++ b/packages/@aws-cdk/integ-runner/test/test-data-fsharp/TestFsharp.integ.snapshot/tree.json
@@ -0,0 +1,65 @@
+{
+ "version": "tree-0.1",
+ "tree": {
+ "id": "App",
+ "path": "",
+ "children": {
+ "Tree": {
+ "id": "Tree",
+ "path": "Tree",
+ "constructInfo": {
+ "fqn": "constructs.Construct",
+ "version": "10.0.0"
+ }
+ },
+ "FsharpAppStack": {
+ "id": "FsharpAppStack",
+ "path": "FsharpAppStack",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Stack",
+ "version": "2.43.1"
+ }
+ },
+ "IntegTest": {
+ "id": "IntegTest",
+ "path": "IntegTest",
+ "children": {
+ "DefaultTest": {
+ "id": "DefaultTest",
+ "path": "IntegTest/DefaultTest",
+ "children": {
+ "Default": {
+ "id": "Default",
+ "path": "IntegTest/DefaultTest/Default",
+ "constructInfo": {
+ "fqn": "constructs.Construct",
+ "version": "10.0.0"
+ }
+ },
+ "DeployAssert": {
+ "id": "DeployAssert",
+ "path": "IntegTest/DefaultTest/DeployAssert",
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.Stack",
+ "version": "2.43.1"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase",
+ "version": "2.43.1-alpha.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "@aws-cdk/integ-tests-alpha.IntegTest",
+ "version": "2.43.1-alpha.0"
+ }
+ }
+ },
+ "constructInfo": {
+ "fqn": "aws-cdk-lib.App",
+ "version": "2.43.1"
+ }
+ }
+}
\ No newline at end of file
--
2.38.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment