Skip to content

Commit

Permalink
Revert "fix(cli): deprecated stack ids printed at the end of synth (#…
Browse files Browse the repository at this point in the history
…19216)"

This reverts commit 7d8a479.
  • Loading branch information
skinny85 committed Mar 11, 2022
1 parent f3a3147 commit 204c88b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
2 changes: 1 addition & 1 deletion packages/aws-cdk/lib/cdk-toolkit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ export class CdkToolkit {

// not outputting template to stdout, let's explain things to the user a little bit...
success(`Successfully synthesized to ${chalk.blue(path.resolve(stacks.assembly.directory))}`);
print(`Supply a stack id (${stacks.stackArtifacts.map(s => chalk.green(s.hierarchicalId)).join(', ')}) to display its template.`);
print(`Supply a stack id (${stacks.stackArtifacts.map(s => chalk.green(s.id)).join(', ')}) to display its template.`);

return undefined;
}
Expand Down
12 changes: 2 additions & 10 deletions packages/aws-cdk/test/cdk-toolkit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ import { instanceMockFrom, MockCloudExecutable, TestStackArtifact } from './util

let cloudExecutable: MockCloudExecutable;
let bootstrapper: jest.Mocked<Bootstrapper>;
let stderrMock: jest.SpyInstance;
beforeEach(() => {
jest.resetAllMocks();

Expand All @@ -87,7 +86,6 @@ beforeEach(() => {
}],
});

stderrMock = jest.spyOn(process.stderr, 'write').mockImplementation(() => { return true; });
});

function defaultToolkitSetup() {
Expand All @@ -107,7 +105,9 @@ describe('readCurrentTemplate', () => {
let template: any;
let mockForEnvironment = jest.fn();
let mockCloudExecutable: MockCloudExecutable;
let stderrMock: jest.SpyInstance;
beforeEach(() => {
stderrMock = jest.spyOn(process.stderr, 'write').mockImplementation(() => { return true; });

template = {
Resources: {
Expand Down Expand Up @@ -677,13 +677,6 @@ describe('watch', () => {
});

describe('synth', () => {
test('successful synth outputs hierarchical stack ids', async () => {
const toolkit = defaultToolkitSetup();
await toolkit.synth([], false, false);

expect(stderrMock.mock.calls[1][0]).toMatch('Test-Stack-A-Display-Name, Test-Stack-B');
});

test('with no stdout option', async () => {
// GIVE
const toolkit = defaultToolkitSetup();
Expand Down Expand Up @@ -794,7 +787,6 @@ class MockStack {
},
],
},
displayName: 'Test-Stack-A-Display-Name',
};
public static readonly MOCK_STACK_B: TestStackArtifact = {
stackName: 'Test-Stack-B',
Expand Down

0 comments on commit 204c88b

Please sign in to comment.