@aws-cdk/integ-runner 2.200.1 → 2.201.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/README.md +22 -2
  2. package/THIRD_PARTY_LICENSES +739 -2567
  3. package/lib/cli.js +43 -7
  4. package/lib/engines/proxy-agent.js +35 -2
  5. package/lib/engines/toolkit-lib.js +43 -7
  6. package/lib/index.js +518 -457
  7. package/lib/logger.js +44 -8
  8. package/lib/runner/{runner-base.d.ts → cdk-integ-helper.d.ts} +96 -33
  9. package/lib/runner/cdk-integ-helper.d.ts.map +1 -0
  10. package/lib/runner/cdk-integ-helper.js +517 -0
  11. package/lib/runner/engine.d.ts +3 -2
  12. package/lib/runner/engine.d.ts.map +1 -1
  13. package/lib/runner/engine.js +1 -1
  14. package/lib/runner/index.d.ts +1 -1
  15. package/lib/runner/index.d.ts.map +1 -1
  16. package/lib/runner/index.js +2 -2
  17. package/lib/runner/integ-test-runner.d.ts +12 -4
  18. package/lib/runner/integ-test-runner.d.ts.map +1 -1
  19. package/lib/runner/integ-test-runner.js +134 -71
  20. package/lib/runner/integ-test-suite.js +36 -3
  21. package/lib/runner/integration-tests.d.ts +8 -0
  22. package/lib/runner/integration-tests.d.ts.map +1 -1
  23. package/lib/runner/integration-tests.js +47 -3
  24. package/lib/runner/private/cloud-assembly.d.ts +1 -2
  25. package/lib/runner/private/cloud-assembly.d.ts.map +1 -1
  26. package/lib/runner/private/cloud-assembly.js +36 -3
  27. package/lib/runner/private/integ-manifest.js +36 -3
  28. package/lib/runner/private/test-specific-context.d.ts +3 -0
  29. package/lib/runner/private/test-specific-context.d.ts.map +1 -0
  30. package/lib/runner/private/test-specific-context.js +81 -0
  31. package/lib/runner/snapshot-test-runner.d.ts +10 -6
  32. package/lib/runner/snapshot-test-runner.d.ts.map +1 -1
  33. package/lib/runner/snapshot-test-runner.js +64 -34
  34. package/lib/unstable-features.js +35 -2
  35. package/lib/workers/common.js +51 -15
  36. package/lib/workers/extract/extract_worker.js +35 -2
  37. package/lib/workers/extract/index.js +5149 -45331
  38. package/lib/workers/integ-snapshot-worker.js +35 -2
  39. package/lib/workers/integ-test-worker.js +35 -2
  40. package/package.json +7 -9
  41. package/lib/runner/runner-base.d.ts.map +0 -1
  42. package/lib/runner/runner-base.js +0 -381
package/lib/logger.js CHANGED
@@ -1,8 +1,44 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __importDefault = (this && this.__importDefault) || function (mod) {
36
+ return (mod && mod.__esModule) ? mod : { "default": mod };
37
+ };
2
38
  Object.defineProperty(exports, "__esModule", { value: true });
3
39
  exports.trace = exports.highlight = exports.success = exports.warning = exports.error = exports.print = void 0;
4
- const util = require("util");
5
- const chalk = require("chalk");
40
+ const util = __importStar(require("util"));
41
+ const chalk_1 = __importDefault(require("chalk"));
6
42
  const { stderr } = process;
7
43
  const logger = (stream, styles) => (fmt, ...args) => {
8
44
  let str = util.format(fmt, ...args);
@@ -12,9 +48,9 @@ const logger = (stream, styles) => (fmt, ...args) => {
12
48
  stream.write(str + '\n');
13
49
  };
14
50
  exports.print = logger(stderr);
15
- exports.error = logger(stderr, [chalk.red]);
16
- exports.warning = logger(stderr, [chalk.yellow]);
17
- exports.success = logger(stderr, [chalk.green]);
18
- exports.highlight = logger(stderr, [chalk.bold]);
19
- exports.trace = logger(stderr, [chalk.gray]);
20
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9nZ2VyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsibG9nZ2VyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUNBLDZCQUE2QjtBQUM3QiwrQkFBK0I7QUFHL0IsTUFBTSxFQUFFLE1BQU0sRUFBRSxHQUFHLE9BQU8sQ0FBQztBQUUzQixNQUFNLE1BQU0sR0FBRyxDQUFDLE1BQWdCLEVBQUUsTUFBa0IsRUFBRSxFQUFFLENBQUMsQ0FBQyxHQUFXLEVBQUUsR0FBRyxJQUFXLEVBQUUsRUFBRTtJQUN2RixJQUFJLEdBQUcsR0FBRyxJQUFJLENBQUMsTUFBTSxDQUFDLEdBQUcsRUFBRSxHQUFHLElBQUksQ0FBQyxDQUFDO0lBQ3BDLElBQUksTUFBTSxJQUFJLE1BQU0sQ0FBQyxNQUFNLEVBQUUsQ0FBQztRQUM1QixHQUFHLEdBQUcsTUFBTSxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUMsRUFBRSxLQUFLLEVBQUUsRUFBRSxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUMsRUFBRSxHQUFHLENBQUMsQ0FBQzt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ID0+IHtcbiAgbGV0IHN0ciA9IHV0aWwuZm9ybWF0KGZtdCwgLi4uYXJncyk7XG4gIGlmIChzdHlsZXMgJiYgc3R5bGVzLmxlbmd0aCkge1xuICAgIHN0ciA9IHN0eWxlcy5yZWR1Y2UoKGEsIHN0eWxlKSA9PiBzdHlsZShhKSwgc3RyKTtcbiAgfVxuICBzdHJlYW0ud3JpdGUoc3RyICsgJ1xcbicpO1xufTtcblxuZXhwb3J0IGNvbnN0IHByaW50ID0gbG9nZ2VyKHN0ZGVycik7XG5leHBvcnQgY29uc3QgZXJyb3IgPSBsb2dnZXIoc3RkZXJyLCBbY2hhbGsucmVkXSk7XG5leHBvcnQgY29uc3Qgd2FybmluZyA9IGxvZ2dlcihzdGRlcnIsIFtjaGFsay55ZWxsb3ddKTtcbmV4cG9ydCBjb25zdCBzdWNjZXNzID0gbG9nZ2VyKHN0ZGVyciwgW2NoYWxrLmdyZWVuXSk7XG5leHBvcnQgY29uc3QgaGlnaGxpZ2h0ID0gbG9nZ2VyKHN0ZGVyciwgW2NoYWxrLmJvbGRdKTtcbmV4cG9ydCBjb25zdCB0cmFjZSA9IGxvZ2dlcihzdGRlcnIsIFtjaGFsay5ncmF5XSk7XG4iXX0=
51
+ exports.error = logger(stderr, [chalk_1.default.red]);
52
+ exports.warning = logger(stderr, [chalk_1.default.yellow]);
53
+ exports.success = logger(stderr, [chalk_1.default.green]);
54
+ exports.highlight = logger(stderr, [chalk_1.default.bold]);
55
+ exports.trace = logger(stderr, [chalk_1.default.gray]);
56
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9nZ2VyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsibG9nZ2VyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUNBLDJDQUE2QjtBQUM3QixrREFBME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ib2xkXSk7XG5leHBvcnQgY29uc3QgdHJhY2UgPSBsb2dnZXIoc3RkZXJyLCBbY2hhbGsuZ3JheV0pO1xuIl19
@@ -4,9 +4,9 @@ import type { IntegTest } from './integration-tests';
4
4
  import type { ICdk } from '../engines/cdk-interface';
5
5
  import type { DestructiveChange } from '../workers/common';
6
6
  /**
7
- * Options for creating an integration test runner
7
+ * Options for creating an integ helper
8
8
  */
9
- export interface IntegRunnerOptions {
9
+ export interface CdkIntegHelperOptions {
10
10
  /**
11
11
  * Information about the test to run
12
12
  */
@@ -62,16 +62,36 @@ export interface IntegRunnerOptions {
62
62
  readonly caBundlePath?: string;
63
63
  }
64
64
  /**
65
- * The different components of a test name
65
+ * Whether to synthesize the actual snapshot with lookups enabled or not.
66
+ *
67
+ * If either `true` or `false`, we send context in or not while synthesizing,
68
+ * and if the generated snapshot test definition requests a different value we
69
+ * will synth again.
70
+ *
71
+ * For `dont-care`, we do send in the context but we never resynth.
66
72
  */
73
+ export type LegacyEnableLookups = true | false | 'dont-care';
67
74
  /**
68
- * Represents an Integration test runner
75
+ * Class with some helper routines for running CDK snapshots and integration tests.
76
+ *
77
+ * A "golden snapshot" is the snapshot that is stored permanently in version
78
+ * control, that new runs are compared against (stored in a directory named
79
+ * `<test-name>.snapshot`).
80
+ *
81
+ * This is as opposed to other snapshots, which can be generated for example
82
+ * temporarily in a temporary directory, to compare agains the golden snapshot.
69
83
  */
70
- export declare abstract class IntegRunner {
84
+ export declare class CdkIntegHelper {
85
+ /**
86
+ * Factory method to create an instance of the CdkIntegHelper.
87
+ *
88
+ * Hiding the constructor to prevent inheritance.
89
+ */
90
+ static create(options: CdkIntegHelperOptions): CdkIntegHelper;
71
91
  /**
72
- * The directory where the snapshot will be stored
92
+ * The directory where the golden snapshot will be stored
73
93
  */
74
- readonly snapshotDir: string;
94
+ readonly goldenSnapshotDir: string;
75
95
  /**
76
96
  * An instance of the CDK CLI
77
97
  */
@@ -85,50 +105,66 @@ export declare abstract class IntegRunner {
85
105
  *
86
106
  * Path to the integ test source file, relative to `this.directory`.
87
107
  */
88
- protected readonly cdkApp: string;
108
+ readonly cdkApp: string;
89
109
  /**
90
110
  * The path where the `cdk.context.json` file
91
111
  * will be created
92
112
  */
93
- protected readonly cdkContextPath: string;
113
+ readonly cdkContextPath: string;
94
114
  /**
95
115
  * The working directory that the integration tests will be
96
116
  * executed from
97
117
  */
98
- protected readonly directory: string;
118
+ readonly directory: string;
99
119
  /**
100
120
  * The test to run
101
121
  */
102
- protected readonly test: IntegTest;
122
+ private readonly test;
103
123
  /**
104
124
  * Default options to pass to the CDK CLI
105
125
  */
106
- protected readonly defaultArgs: DefaultCdkOptions;
126
+ readonly defaultArgs: DefaultCdkOptions;
107
127
  /**
108
128
  * The directory where the CDK will be synthed to
109
129
  *
110
130
  * Relative to cwd.
111
131
  */
112
- protected readonly cdkOutDir: string;
132
+ readonly cdkOutDir: string;
113
133
  /**
114
134
  * The profile to use for the CDK CLI calls
115
135
  */
116
- protected readonly profile?: string;
136
+ readonly profile?: string;
117
137
  /**
118
138
  * Show output from the integ test run.
119
139
  */
120
- protected readonly showOutput: boolean;
121
- protected _destructiveChanges?: DestructiveChange[];
140
+ private readonly showOutput;
141
+ _destructiveChanges?: DestructiveChange[];
122
142
  private legacyContext?;
123
143
  private _expectedTestSuite?;
124
- private _actualTestSuite?;
125
- constructor(options: IntegRunnerOptions);
144
+ private _actualSnapshot?;
145
+ private _legacyEnableLookups?;
126
146
  /**
127
- * Return the list of expected (i.e. existing) test cases for this integration test
147
+ * Fields that require an async context to initialize.
128
148
  */
129
- expectedTests(): Promise<{
130
- [testName: string]: TestCase;
131
- } | undefined>;
149
+ private _asyncMembers?;
150
+ /**
151
+ * Private constructor to prevent inheritance.
152
+ */
153
+ private constructor();
154
+ /**
155
+ * Async initialization; copy information from an async context into variables so we can access them synchronously later.
156
+ *
157
+ * We call this automatically in all public async members, but if a consumer wants to access this context synchronously
158
+ * without calling an async members first, it needs to call this.
159
+ */
160
+ asyncInitialize(): Promise<void>;
161
+ private get asyncMembers();
162
+ /**
163
+ * Configure the legacy enableLookups value to use when generating the actual snapshot.
164
+ *
165
+ * Must be set before using snapshot methods.
166
+ */
167
+ configureLegacyEnableLookups(enableLookups: LegacyEnableLookups): void;
132
168
  /**
133
169
  * Return the list of actual (i.e. new) test cases for this integration test
134
170
  */
@@ -140,7 +176,29 @@ export declare abstract class IntegRunner {
140
176
  * existing "expected" snapshot
141
177
  * This will synth and then load the integration test manifest
142
178
  */
143
- generateActualSnapshot(): Promise<IntegTestSuite | LegacyIntegTestSuite>;
179
+ private generateActualSnapshot;
180
+ /**
181
+ * Synth the actual application to the given directory, for purposes of generating/validating a snapshot
182
+ *
183
+ * `legacyEnableLookups` is to preserve historical behavior for a while:
184
+ * traditionally, the application would only be seeded with context if
185
+ * `enableLookups` was true, and this information would come from the test
186
+ * definition.
187
+ *
188
+ * - Since the test definition comes from inside the app, this requires a
189
+ * synth just to get the test definition, and then another synth to generate
190
+ * the actual snapshot with the correct context, which is time consuming.
191
+ * - Given that the context is fixed and fake, it could always have been passed.
192
+ *
193
+ * However, the snapshot contents themselves depend on the context flag, and changing
194
+ * this behavior now invalidates all snapshots everywhere, which is annoying for upgrading.
195
+ *
196
+ * So we will use the behavior from the GOLDEN SNAPSHOT's test definition to
197
+ * determine whether to pass the context, and if the new actual snapshot has a
198
+ * different value for `enableLookups`, we will throw away the old snapshot and synth again.
199
+ */
200
+ private synthActualSnapshot;
201
+ actualSynthReproCommand(): string[];
144
202
  /**
145
203
  * Returns true if a snapshot already exists for this test
146
204
  */
@@ -148,11 +206,12 @@ export declare abstract class IntegRunner {
148
206
  /**
149
207
  * The test suite from the existing snapshot
150
208
  */
151
- protected expectedTestSuite(): Promise<IntegTestSuite | LegacyIntegTestSuite | undefined>;
209
+ expectedTestSuite(): Promise<IntegTestSuite | LegacyIntegTestSuite | undefined>;
210
+ actualSnapshot(): Promise<SnapshotAndTestDefinition>;
152
211
  /**
153
212
  * The test suite from the new "actual" snapshot
154
213
  */
155
- protected actualTestSuite(): Promise<IntegTestSuite | LegacyIntegTestSuite>;
214
+ private actualTestSuite;
156
215
  /**
157
216
  * Load the integ manifest which contains information
158
217
  * on how to execute the tests
@@ -160,8 +219,8 @@ export declare abstract class IntegRunner {
160
219
  * from the cloud assembly. If it doesn't exist, then we fallback to the
161
220
  * "legacy mode" and create a manifest from pragma
162
221
  */
163
- protected loadManifest(dir?: string): Promise<IntegTestSuite | LegacyIntegTestSuite>;
164
- protected cleanup(): void;
222
+ loadManifest(dir?: string): Promise<IntegTestSuite | LegacyIntegTestSuite>;
223
+ cleanup(): void;
165
224
  /**
166
225
  * If there are any destructive changes to a stack then this will record
167
226
  * those in the manifest.json file
@@ -176,13 +235,13 @@ export declare abstract class IntegRunner {
176
235
  * disabled and then delete assets that relate to that stack. It does that
177
236
  * by reading the asset manifest for the stack and deleting the asset source
178
237
  */
179
- protected removeAssetsFromSnapshot(): Promise<void>;
238
+ private removeAssetsFromSnapshot;
180
239
  /**
181
240
  * Remove the asset cache (.cache/) files from the snapshot.
182
241
  * These are a cache of the asset zips, but we are fine with
183
242
  * re-zipping on deploy
184
243
  */
185
- protected removeAssetsCacheFromSnapshot(): void;
244
+ private removeAssetsCacheFromSnapshot;
186
245
  /**
187
246
  * Create the new snapshot.
188
247
  *
@@ -193,14 +252,14 @@ export declare abstract class IntegRunner {
193
252
  * If lookups are disabled (which means the stack is env agnostic) then just copy
194
253
  * the assembly that was output by the deployment
195
254
  */
196
- protected createSnapshot(): Promise<void>;
255
+ createSnapshot(): Promise<void>;
197
256
  /**
198
257
  * Perform some cleanup steps after the snapshot is created
199
258
  * Anytime the snapshot needs to be modified after creation
200
259
  * the logic should live here.
201
260
  */
202
- private cleanupSnapshot;
203
- protected getContext(additionalContext?: Record<string, any>): Record<string, any>;
261
+ private cleanupGoldenSnapshot;
262
+ getContext(additionalContext?: Record<string, any>): Record<string, any>;
204
263
  }
205
264
  export declare const DEFAULT_SYNTH_OPTIONS: {
206
265
  context: {
@@ -325,4 +384,8 @@ export declare function currentlyRecommendedAwsCdkLibFlags(): {
325
384
  "@aws-cdk/aws-batch:defaultToAL2023": boolean;
326
385
  "@aws-cdk/core:annotationsInValidationReport": boolean;
327
386
  };
328
- //# sourceMappingURL=runner-base.d.ts.map
387
+ export interface SnapshotAndTestDefinition {
388
+ readonly testDefinition: IntegTestSuite | LegacyIntegTestSuite;
389
+ readonly snapshotDirectory: string;
390
+ }
391
+ //# sourceMappingURL=cdk-integ-helper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cdk-integ-helper.d.ts","sourceRoot":"","sources":["cdk-integ-helper.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAElF,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAIrD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAIrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAM3D;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAEzB;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB;;;;OAIG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAE1B;;;;;OAKG;IACH,QAAQ,CAAC,GAAG,CAAC,EAAE;QAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IAE1C;;;;OAIG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAE9B;;;;OAIG;IACH,QAAQ,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC;IAEpB;;;;OAIG;IACH,QAAQ,CAAC,UAAU,C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