Skip to content

Commit

Permalink
chore(cli): tests that apply only to v1 are failing when building for…
Browse files Browse the repository at this point in the history
… v2 (aws#15565)

In v1 we are allowing selection by the ID of the stack, with a warning that it will be stop working in v2 and asking the user to use the same names shown in the `cdk ls` result. Since the tests are written with the ID as input, they work when building for v1, but fail when building for v2. This change makes it work in both cases.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
otaviomacedo authored and hollanddd committed Aug 26, 2021
1 parent cc2adeb commit 481d8b7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/aws-cdk/test/api/cloud-assembly.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ test('select behavior with nested assemblies: repeat', async() => {
const cxasm = await testNestedCloudAssembly();

// WHEN
const x = await cxasm.selectStacks({ patterns: ['withouterrors', 'withouterrors', 'nested'] }, {
const x = await cxasm.selectStacks({ patterns: ['deeply/hidden/withouterrors', 'nested'] }, {
defaultBehavior: DefaultSelection.AllStacks,
});

Expand Down
2 changes: 1 addition & 1 deletion packages/aws-cdk/test/cdk-toolkit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ describe('synth', () => {

const toolkit = defaultToolkitSetup();

await expect(toolkit.synth(['witherrors'], false, true)).rejects.toBeDefined();
await expect(toolkit.synth(['Test-Stack-A/witherrors'], false, true)).rejects.toBeDefined();
});

test('stack has error, is not flagged for validation and was not explicitly selected', async () => {
Expand Down

0 comments on commit 481d8b7

Please sign in to comment.