diff --git a/packages/aws-cdk/lib/api/bootstrap/bootstrap-props.ts b/packages/aws-cdk/lib/api/bootstrap/bootstrap-props.ts index 95661a0bd96b0..b575acb50fc78 100644 --- a/packages/aws-cdk/lib/api/bootstrap/bootstrap-props.ts +++ b/packages/aws-cdk/lib/api/bootstrap/bootstrap-props.ts @@ -129,5 +129,4 @@ export interface BootstrappingParameters { * @default - No value, optional argument */ readonly customPermissionsBoundary?: string; - } diff --git a/packages/aws-cdk/lib/cli.ts b/packages/aws-cdk/lib/cli.ts index ac7be73f2f019..f63c7cbf21eef 100644 --- a/packages/aws-cdk/lib/cli.ts +++ b/packages/aws-cdk/lib/cli.ts @@ -547,7 +547,7 @@ export async function exec(args: string[], synthesizer?: Synthesizer): Promise { let mockForEnvironment = jest.fn(); let mockCloudExecutable: MockCloudExecutable; beforeEach(() => { - template = { Resources: { Func: { @@ -394,6 +394,29 @@ describe('readCurrentTemplate', () => { }); }); +describe('bootstrap', () => { + test('accepts qualifier from context', async () => { + // GIVEN + const toolkit = defaultToolkitSetup(); + const configuration = new Configuration(); + configuration.context.set('@aws-cdk/core:bootstrapQualifier', 'abcde'); + + // WHEN + await toolkit.bootstrap(['aws://56789/south-pole'], bootstrapper, { + parameters: { + qualifier: configuration.context.get('@aws-cdk/core:bootstrapQualifier'), + }, + }); + + // THEN + expect(bootstrapper.bootstrapEnvironment).toHaveBeenCalledWith(expect.anything(), expect.anything(), { + parameters: { + qualifier: 'abcde', + }, + }); + }); +}); + describe('deploy', () => { test('fails when no valid stack names are given', async () => { // GIVEN