From 608fd158629184733fe7847d74abc49fe3185d4b Mon Sep 17 00:00:00 2001 From: David Venable Date: Wed, 4 Sep 2024 16:30:28 -0500 Subject: [PATCH] Corrects the S3SinkStack for AWS testing (#4913) 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..fcdd4914ae 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: [ {