From 1dd6dcdc9b92f10aa175cfae923efaca2e9c1b9f Mon Sep 17 00:00:00 2001 From: David Venable Date: Wed, 4 Sep 2024 14:17:29 -0500 Subject: [PATCH 1/2] Corrects the S3SinkStack for AWS testing. The S3SinkStack was not in use and didn't quite work. This corrects it so that we can use it to automate the tests for the S3 sink in GitHub. Signed-off-by: David Venable --- testing/aws-testing-cdk/bin/aws-testing-cdk.ts | 5 +++++ testing/aws-testing-cdk/lib/s3/S3SinkStack.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/testing/aws-testing-cdk/bin/aws-testing-cdk.ts b/testing/aws-testing-cdk/bin/aws-testing-cdk.ts index 13452ce0f7..7e62ae2659 100644 --- a/testing/aws-testing-cdk/bin/aws-testing-cdk.ts +++ b/testing/aws-testing-cdk/bin/aws-testing-cdk.ts @@ -4,6 +4,7 @@ import * as cdk from 'aws-cdk-lib'; import {GitHubAccessStack} from '../lib/common/GitHubAccessStack'; import {SecretsManagerStack} from '../lib/aws-secrets-manager/SecretsManagerStack'; import {KmsStack} from '../lib/common/KmsStack'; +import {S3SinkStack} from "../lib/s3/S3SinkStack"; const app = new cdk.App(); @@ -16,3 +17,7 @@ new KmsStack(app, 'CommonKmsStack', { new SecretsManagerStack(app, 'SecretsManagerStack', { testingRole: githubStack.gitHubActionsTestingRole }); + +new S3SinkStack(app, 'S3SinkStack', { + testingRole: githubStack.gitHubActionsTestingRole +}); diff --git a/testing/aws-testing-cdk/lib/s3/S3SinkStack.ts b/testing/aws-testing-cdk/lib/s3/S3SinkStack.ts index ea6d22615f..89fe05d836 100644 --- a/testing/aws-testing-cdk/lib/s3/S3SinkStack.ts +++ b/testing/aws-testing-cdk/lib/s3/S3SinkStack.ts @@ -21,7 +21,7 @@ export class S3SinkStack extends Stack { constructor(scope: Construct, id: string, props: S3SinkStackProps) { super(scope, id, props); - new Bucket(this, 'MyBucket', { + this.bucket = new Bucket(this, 'DataPrepperSinkTest', { removalPolicy: RemovalPolicy.DESTROY, lifecycleRules: [ { From 7ed0bc7e45611bf6559560c6eb7954e5fc02cd39 Mon Sep 17 00:00:00 2001 From: David Venable Date: Wed, 4 Sep 2024 14:42:38 -0500 Subject: [PATCH 2/2] Fix lint Signed-off-by: David Venable --- testing/aws-testing-cdk/bin/aws-testing-cdk.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/aws-testing-cdk/bin/aws-testing-cdk.ts b/testing/aws-testing-cdk/bin/aws-testing-cdk.ts index 7e62ae2659..fcdd4914ae 100644 --- a/testing/aws-testing-cdk/bin/aws-testing-cdk.ts +++ b/testing/aws-testing-cdk/bin/aws-testing-cdk.ts @@ -4,7 +4,7 @@ import * as cdk from 'aws-cdk-lib'; import {GitHubAccessStack} from '../lib/common/GitHubAccessStack'; import {SecretsManagerStack} from '../lib/aws-secrets-manager/SecretsManagerStack'; import {KmsStack} from '../lib/common/KmsStack'; -import {S3SinkStack} from "../lib/s3/S3SinkStack"; +import {S3SinkStack} from '../lib/s3/S3SinkStack'; const app = new cdk.App();