From 8afbe71723b3f85247956a6d02047a1aaa2ea8c0 Mon Sep 17 00:00:00 2001 From: Madeline Kusters Date: Wed, 11 Aug 2021 15:32:02 -0700 Subject: [PATCH] chore(ec2): explicit feature flags to produce a consistent template during tests --- .../aws-ec2/test/client-vpn-authorization-rule.test.ts | 9 +++++++-- packages/@aws-cdk/aws-ec2/test/client-vpn-route.test.ts | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/packages/@aws-cdk/aws-ec2/test/client-vpn-authorization-rule.test.ts b/packages/@aws-cdk/aws-ec2/test/client-vpn-authorization-rule.test.ts index 6c8911d90a06d..5390eb43adb85 100644 --- a/packages/@aws-cdk/aws-ec2/test/client-vpn-authorization-rule.test.ts +++ b/packages/@aws-cdk/aws-ec2/test/client-vpn-authorization-rule.test.ts @@ -1,11 +1,16 @@ import '@aws-cdk/assert-internal/jest'; -import { Stack } from '@aws-cdk/core'; +import { App, Stack } from '@aws-cdk/core'; import { Connections, IClientVpnEndpoint } from '../lib'; import { ClientVpnAuthorizationRule } from '../lib/client-vpn-authorization-rule'; let stack: Stack; beforeEach(() => { - stack = new Stack(); + const app = new App({ + context: { + '@aws-cdk/core:newStyleStackSynthesis': false, + }, + }); + stack = new Stack(app); }); describe('ClientVpnAuthorizationRule constructor', () => { diff --git a/packages/@aws-cdk/aws-ec2/test/client-vpn-route.test.ts b/packages/@aws-cdk/aws-ec2/test/client-vpn-route.test.ts index 42f094ab4bb9e..fde37f49335ae 100644 --- a/packages/@aws-cdk/aws-ec2/test/client-vpn-route.test.ts +++ b/packages/@aws-cdk/aws-ec2/test/client-vpn-route.test.ts @@ -1,6 +1,6 @@ import '@aws-cdk/assert-internal/jest'; import { SamlMetadataDocument, SamlProvider } from '@aws-cdk/aws-iam'; -import { Stack } from '@aws-cdk/core'; +import { App, Stack } from '@aws-cdk/core'; import * as ec2 from '../lib'; import { ClientVpnRoute, @@ -11,7 +11,12 @@ import { let stack: Stack; let vpc: ec2.IVpc; beforeEach(() => { - stack = new Stack(); + const app = new App({ + context: { + '@aws-cdk/core:newStyleStackSynthesis': false, + }, + }); + stack = new Stack(app); vpc = new ec2.Vpc(stack, 'Vpc'); });