From 2845514e8fa4d4066ebdfd5dd8a365509650fdac Mon Sep 17 00:00:00 2001 From: Niranjan Jayakar Date: Tue, 9 Feb 2021 14:10:34 +0000 Subject: [PATCH] remove legacy behaviour from s3 bucket unit test --- packages/@aws-cdk/aws-s3/test/bucket.test.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/@aws-cdk/aws-s3/test/bucket.test.ts b/packages/@aws-cdk/aws-s3/test/bucket.test.ts index ab765aeaf9361..9ee84710c8157 100644 --- a/packages/@aws-cdk/aws-s3/test/bucket.test.ts +++ b/packages/@aws-cdk/aws-s3/test/bucket.test.ts @@ -1474,10 +1474,9 @@ describe('bucket', () => { }); - // testing this only in legacy mode. see https://github.com/aws/aws-cdk/issues/12921 - testLegacyBehavior('in different accounts, with a KMS Key', cdk.App, (app) => { + test('in different accounts, with a KMS Key', () => { // given - const stackA = new cdk.Stack(app, 'StackA', { env: { account: '123456789012' } }); + const stackA = new cdk.Stack(undefined, 'StackA', { env: { account: '123456789012' } }); const key = new kms.Key(stackA, 'MyKey'); const bucketFromStackA = new s3.Bucket(stackA, 'MyBucket', { bucketName: 'my-bucket-physical-name', @@ -1485,7 +1484,7 @@ describe('bucket', () => { encryption: s3.BucketEncryption.KMS, }); - const stackB = new cdk.Stack(app, 'StackB', { env: { account: '234567890123' } }); + const stackB = new cdk.Stack(undefined, 'StackB', { env: { account: '234567890123' } }); const roleFromStackB = new iam.Role(stackB, 'MyRole', { assumedBy: new iam.AccountPrincipal('234567890123'), roleName: 'MyRolePhysicalName',