From 165b03f0dcaf2292e670f224827d5e95b71e2d6d Mon Sep 17 00:00:00 2001 From: Cory Hall <43035978+corymhall@users.noreply.github.com> Date: Mon, 4 Apr 2022 08:20:22 -0400 Subject: [PATCH] chore(aws-secretsmanager): fix broken integration tests (#19698) Feature flag must be set for the validation lambda function to work correctly ---- ### All Submissions: * [ ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)? * [ ] Did you use `cdk-integ` to deploy the infrastructure and generate the snapshot (i.e. `cdk-integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- .../aws-secretsmanager/test/integ.secret-name-parsed.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/@aws-cdk/aws-secretsmanager/test/integ.secret-name-parsed.ts b/packages/@aws-cdk/aws-secretsmanager/test/integ.secret-name-parsed.ts index 801077c5c8494..e1cb05390d5a5 100644 --- a/packages/@aws-cdk/aws-secretsmanager/test/integ.secret-name-parsed.ts +++ b/packages/@aws-cdk/aws-secretsmanager/test/integ.secret-name-parsed.ts @@ -2,6 +2,8 @@ import * as path from 'path'; import * as cdk from '@aws-cdk/core'; import * as secretsmanager from '../lib'; +/// !cdk-integ Integ-SecretsManager-ParsedSecretName pragma:set-context:@aws-cdk/aws-secretsmanager:parseOwnedSecretName=true + /** * Creates several secrets, with varying names and IDs, with the parseOwnedSecretName feature flag set, * to verify the secretName returned by `Secret.secretName` matches the `Name` returned by `DescribeSecrets`. @@ -39,6 +41,9 @@ class SecretsManagerStack extends cdk.Stack { } const app = new cdk.App({ + context: { + '@aws-cdk/aws-secretsmanager:parseOwnedSecretName': true, + }, }); new SecretsManagerStack(app, 'Integ-SecretsManager-ParsedSecretName'); app.synth();