|
1 | 1 | import * as child_process from 'child_process';
|
2 | 2 | import { CdkCliWrapper } from '../lib/cdk-wrapper';
|
3 |
| -import { RequireApproval } from '../lib/commands'; |
| 3 | +import { RequireApproval, StackActivityProgress } from '../lib/commands'; |
4 | 4 | let spawnSyncMock: jest.SpyInstance;
|
5 | 5 |
|
6 | 6 | beforeEach(() => {
|
@@ -33,7 +33,7 @@ test('default deploy', () => {
|
33 | 33 | // THEN
|
34 | 34 | expect(spawnSyncMock).toHaveBeenCalledWith(
|
35 | 35 | expect.stringMatching(/cdk/),
|
36 |
| - ['deploy', '--app', 'node bin/my-app.js', 'test-stack1'], |
| 36 | + ['deploy', '--progress', 'events', '--app', 'node bin/my-app.js', 'test-stack1'], |
37 | 37 | expect.objectContaining({
|
38 | 38 | env: expect.anything(),
|
39 | 39 | cwd: '/project',
|
@@ -82,6 +82,7 @@ test('deploy with all arguments', () => {
|
82 | 82 | toolkitStackName: 'Toolkit',
|
83 | 83 | versionReporting: true,
|
84 | 84 | usePreviousParameters: true,
|
| 85 | + progress: StackActivityProgress.BAR, |
85 | 86 | });
|
86 | 87 |
|
87 | 88 | // THEN
|
@@ -120,6 +121,7 @@ test('deploy with all arguments', () => {
|
120 | 121 | '--change-set-name', 'my-change-set',
|
121 | 122 | '--toolkit-stack-name', 'Toolkit',
|
122 | 123 | '--previous-parameters',
|
| 124 | + '--progress', 'bar', |
123 | 125 | '--app',
|
124 | 126 | 'node bin/my-app.js',
|
125 | 127 | 'test-stack1',
|
@@ -149,6 +151,7 @@ test('can parse boolean arguments', () => {
|
149 | 151 | expect.stringMatching(/cdk/),
|
150 | 152 | [
|
151 | 153 | 'deploy',
|
| 154 | + '--progress', 'events', |
152 | 155 | '--app',
|
153 | 156 | 'node bin/my-app.js',
|
154 | 157 | '--json',
|
@@ -184,6 +187,7 @@ test('can parse parameters', () => {
|
184 | 187 | 'deploy',
|
185 | 188 | '--parameters', 'myparam=test',
|
186 | 189 | '--parameters', 'test-stack1:myotherparam=test',
|
| 190 | + '--progress', 'events', |
187 | 191 | '--app',
|
188 | 192 | 'node bin/my-app.js',
|
189 | 193 | 'test-stack1',
|
@@ -214,6 +218,7 @@ test('can parse context', () => {
|
214 | 218 | expect.stringMatching(/cdk/),
|
215 | 219 | [
|
216 | 220 | 'deploy',
|
| 221 | + '--progress', 'events', |
217 | 222 | '--app',
|
218 | 223 | 'node bin/my-app.js',
|
219 | 224 | '--context', 'myContext=value',
|
@@ -248,6 +253,7 @@ test('can parse array arguments', () => {
|
248 | 253 | 'deploy',
|
249 | 254 | '--notification-arns', 'arn:aws:us-east-1:1111111111:some:resource',
|
250 | 255 | '--notification-arns', 'arn:aws:us-east-1:1111111111:some:other-resource',
|
| 256 | + '--progress', 'events', |
251 | 257 | '--app',
|
252 | 258 | 'node bin/my-app.js',
|
253 | 259 | 'test-stack1',
|
@@ -275,7 +281,7 @@ test('can provide additional environment', () => {
|
275 | 281 | // THEN
|
276 | 282 | expect(spawnSyncMock).toHaveBeenCalledWith(
|
277 | 283 | expect.stringMatching(/cdk/),
|
278 |
| - ['deploy', '--app', 'node bin/my-app.js', 'test-stack1'], |
| 284 | + ['deploy', '--progress', 'events', '--app', 'node bin/my-app.js', 'test-stack1'], |
279 | 285 | expect.objectContaining({
|
280 | 286 | env: expect.objectContaining({
|
281 | 287 | KEY: 'value',
|
|
0 commit comments