@aws-cdk/integ-runner 2.202.2 → 2.202.3
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.
- package/lib/cli.d.ts.map +1 -1
- package/lib/cli.js +3 -2
- package/lib/engines/toolkit-lib.d.ts +1 -1
- package/lib/engines/toolkit-lib.d.ts.map +1 -1
- package/lib/engines/toolkit-lib.js +11 -11
- package/lib/files.d.ts +9 -0
- package/lib/files.d.ts.map +1 -0
- package/lib/files.js +51 -0
- package/lib/index.js +218 -182
- package/lib/runner/{cdk-integ-helper.d.ts → cdk-test-app.d.ts} +90 -114
- package/lib/runner/cdk-test-app.d.ts.map +1 -0
- package/lib/runner/cdk-test-app.js +584 -0
- package/lib/runner/engine.d.ts +2 -2
- package/lib/runner/engine.d.ts.map +1 -1
- package/lib/runner/engine.js +2 -2
- package/lib/runner/index.d.ts +1 -1
- package/lib/runner/index.d.ts.map +1 -1
- package/lib/runner/index.js +2 -2
- package/lib/runner/integ-test-runner.d.ts +36 -36
- package/lib/runner/integ-test-runner.d.ts.map +1 -1
- package/lib/runner/integ-test-runner.js +172 -235
- package/lib/runner/integ-test-suite.d.ts +6 -11
- package/lib/runner/integ-test-suite.d.ts.map +1 -1
- package/lib/runner/integ-test-suite.js +14 -20
- package/lib/runner/integration-tests.d.ts +12 -3
- package/lib/runner/integration-tests.d.ts.map +1 -1
- package/lib/runner/integration-tests.js +32 -8
- package/lib/runner/snapshot-test-runner.d.ts +19 -22
- package/lib/runner/snapshot-test-runner.d.ts.map +1 -1
- package/lib/runner/snapshot-test-runner.js +47 -75
- package/lib/workers/extract/extract_worker.d.ts.map +1 -1
- package/lib/workers/extract/extract_worker.js +65 -78
- package/lib/workers/extract/index.js +226955 -226979
- package/lib/workers/integ-test-worker.d.ts.map +1 -1
- package/lib/workers/integ-test-worker.js +3 -2
- package/package.json +3 -3
- package/lib/runner/cdk-integ-helper.d.ts.map +0 -1
- package/lib/runner/cdk-integ-helper.js +0 -525
package/lib/runner/engine.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CdkTestAppOptions } from './cdk-test-app';
|
|
2
2
|
import { ToolkitLibRunnerEngine } from '../engines/toolkit-lib';
|
|
3
3
|
/**
|
|
4
4
|
* Creates the engine for running integration tests.
|
|
@@ -6,5 +6,5 @@ import { ToolkitLibRunnerEngine } from '../engines/toolkit-lib';
|
|
|
6
6
|
* Only the toolkit-lib engine is supported.
|
|
7
7
|
*/
|
|
8
8
|
export declare function makeEngine(options: EngineOptions): ToolkitLibRunnerEngine;
|
|
9
|
-
export type EngineOptions = Pick<
|
|
9
|
+
export type EngineOptions = Pick<CdkTestAppOptions, 'test' | 'showOutput' | 'env' | 'region' | 'profile' | 'proxy' | 'caBundlePath'>;
|
|
10
10
|
//# sourceMappingURL=engine.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["engine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["engine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAEhE;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,aAAa,GAAG,sBAAsB,CAUzE;AAED,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,iBAAiB,EAAE,MAAM,GAAG,YAAY,GAAG,KAAK,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,GAAG,cAAc,CAAC,CAAC"}
|
package/lib/runner/engine.js
CHANGED
|
@@ -9,7 +9,7 @@ const toolkit_lib_1 = require("../engines/toolkit-lib");
|
|
|
9
9
|
*/
|
|
10
10
|
function makeEngine(options) {
|
|
11
11
|
return new toolkit_lib_1.ToolkitLibRunnerEngine({
|
|
12
|
-
workingDirectory: options.test.
|
|
12
|
+
workingDirectory: options.test.workingDirectory,
|
|
13
13
|
showOutput: options.showOutput,
|
|
14
14
|
env: options.env,
|
|
15
15
|
region: options.region,
|
|
@@ -18,4 +18,4 @@ function makeEngine(options) {
|
|
|
18
18
|
caBundlePath: options.caBundlePath,
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
21
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW5naW5lLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiZW5naW5lLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBUUEsZ0NBVUM7QUFqQkQsd0RBQWdFO0FBRWhFOzs7O0dBSUc7QUFDSCxTQUFnQixVQUFVLENBQUMsT0FBc0I7SUFDL0MsT0FBTyxJQUFJLG9DQUFzQixDQUFDO1FBQ2hDLGdCQUFnQixFQUFFLE9BQU8sQ0FBQyxJQUFJLENBQUMsZ0JBQWdCO1FBQy9DLFVBQVUsRUFBRSxPQUFPLENBQUMsVUFBVTtRQUM5QixHQUFHLEVBQUUsT0FBTyxDQUFDLEdBQUc7UUFDaEIsTUFBTSxFQUFFLE9BQU8sQ0FBQyxNQUFNO1FBQ3RCLE9BQU8sRUFBRSxPQUFPLENBQUMsT0FBTztRQUN4QixLQUFLLEVBQUUsT0FBTyxDQUFDLEtBQUs7UUFDcEIsWUFBWSxFQUFFLE9BQU8sQ0FBQyxZQUFZO0tBQ25DLENBQUMsQ0FBQztBQUNMLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgdHlwZSB7IENka1Rlc3RBcHBPcHRpb25zIH0gZnJvbSAnLi9jZGstdGVzdC1hcHAnO1xuaW1wb3J0IHsgVG9vbGtpdExpYlJ1bm5lckVuZ2luZSB9IGZyb20gJy4uL2VuZ2luZXMvdG9vbGtpdC1saWInO1xuXG4vKipcbiAqIENyZWF0ZXMgdGhlIGVuZ2luZSBmb3IgcnVubmluZyBpbnRlZ3JhdGlvbiB0ZXN0cy5cbiAqXG4gKiBPbmx5IHRoZSB0b29sa2l0LWxpYiBlbmdpbmUgaXMgc3VwcG9ydGVkLlxuICovXG5leHBvcnQgZnVuY3Rpb24gbWFrZUVuZ2luZShvcHRpb25zOiBFbmdpbmVPcHRpb25zKTogVG9vbGtpdExpYlJ1bm5lckVuZ2luZSB7XG4gIHJldHVybiBuZXcgVG9vbGtpdExpYlJ1bm5lckVuZ2luZSh7XG4gICAgd29ya2luZ0RpcmVjdG9yeTogb3B0aW9ucy50ZXN0LndvcmtpbmdEaXJlY3RvcnksXG4gICAgc2hvd091dHB1dDogb3B0aW9ucy5zaG93T3V0cHV0LFxuICAgIGVudjogb3B0aW9ucy5lbnYsXG4gICAgcmVnaW9uOiBvcHRpb25zLnJlZ2lvbixcbiAgICBwcm9maWxlOiBvcHRpb25zLnByb2ZpbGUsXG4gICAgcHJveHk6IG9wdGlvbnMucHJveHksXG4gICAgY2FCdW5kbGVQYXRoOiBvcHRpb25zLmNhQnVuZGxlUGF0aCxcbiAgfSk7XG59XG5cbmV4cG9ydCB0eXBlIEVuZ2luZU9wdGlvbnMgPSBQaWNrPENka1Rlc3RBcHBPcHRpb25zLCAndGVzdCcgfCAnc2hvd091dHB1dCcgfCAnZW52JyB8ICdyZWdpb24nIHwgJ3Byb2ZpbGUnIHwgJ3Byb3h5JyB8ICdjYUJ1bmRsZVBhdGgnPjtcbiJdfQ==
|
package/lib/runner/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC"}
|
package/lib/runner/index.js
CHANGED
|
@@ -14,9 +14,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./cdk-
|
|
17
|
+
__exportStar(require("./cdk-test-app"), exports);
|
|
18
18
|
__exportStar(require("./integ-test-suite"), exports);
|
|
19
19
|
__exportStar(require("./integ-test-runner"), exports);
|
|
20
20
|
__exportStar(require("./snapshot-test-runner"), exports);
|
|
21
21
|
__exportStar(require("./integration-tests"), exports);
|
|
22
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
22
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJpbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsaURBQStCO0FBQy9CLHFEQUFtQztBQUNuQyxzREFBb0M7QUFDcEMseURBQXVDO0FBQ3ZDLHNEQUFvQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vY2RrLXRlc3QtYXBwJztcbmV4cG9ydCAqIGZyb20gJy4vaW50ZWctdGVzdC1zdWl0ZSc7XG5leHBvcnQgKiBmcm9tICcuL2ludGVnLXRlc3QtcnVubmVyJztcbmV4cG9ydCAqIGZyb20gJy4vc25hcHNob3QtdGVzdC1ydW5uZXInO1xuZXhwb3J0ICogZnJvbSAnLi9pbnRlZ3JhdGlvbi10ZXN0cyc7XG4iXX0=
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { CdkIntegHelperOptions } from './cdk-integ-helper';
|
|
1
|
+
import type { CdkTestAppOptions } from './cdk-test-app';
|
|
3
2
|
import type { DestructiveChange, AssertionResults } from '../workers/common';
|
|
4
3
|
export interface CommonOptions {
|
|
5
|
-
/**
|
|
6
|
-
* The name of the test case
|
|
7
|
-
*/
|
|
8
|
-
readonly testCaseName: string;
|
|
9
4
|
/**
|
|
10
5
|
* The level of verbosity for logging.
|
|
11
6
|
*
|
|
@@ -78,25 +73,47 @@ export interface RunOptions extends CommonOptions {
|
|
|
78
73
|
*/
|
|
79
74
|
readonly allowDeleteFailures?: boolean;
|
|
80
75
|
}
|
|
76
|
+
type RunnerOptions = Omit<CdkTestAppOptions, 'outputDirectoryNameTemplate'> & {
|
|
77
|
+
/**
|
|
78
|
+
* Just for testing
|
|
79
|
+
*
|
|
80
|
+
* Use the comparison output directory for deployments, instead of a separate output
|
|
81
|
+
* directory.
|
|
82
|
+
*
|
|
83
|
+
* Preferably, we synth into a separate directory so that snapshot comparison assembly and
|
|
84
|
+
* deployment assembly don't trample on each other, but the tests in this repository have
|
|
85
|
+
* been set up to use the same directory.
|
|
86
|
+
*/
|
|
87
|
+
TESTING_useComparisonOutputDirectory?: boolean;
|
|
88
|
+
};
|
|
81
89
|
/**
|
|
82
90
|
* An integration test runner that orchestrates executing
|
|
83
91
|
* integration tests
|
|
84
92
|
*/
|
|
85
93
|
export declare class IntegTestRunner {
|
|
86
|
-
private readonly
|
|
87
|
-
|
|
94
|
+
private readonly appOptions;
|
|
95
|
+
private readonly destructiveChanges?;
|
|
96
|
+
private readonly test;
|
|
97
|
+
constructor(appOptions: RunnerOptions, destructiveChanges?: DestructiveChange[] | undefined);
|
|
88
98
|
/**
|
|
89
|
-
*
|
|
99
|
+
* Orchestrates running integration tests. Currently this includes
|
|
100
|
+
*
|
|
101
|
+
* 1. (if update workflow is enabled) Deploying the snapshot test stacks
|
|
102
|
+
* 2. Deploying the integration test stacks
|
|
103
|
+
* 2. Saving the snapshot (if successful)
|
|
104
|
+
* 3. Destroying the integration test stacks (if clean=false)
|
|
105
|
+
*
|
|
106
|
+
* The update workflow exists to check for cases where a change would cause
|
|
107
|
+
* a failure to an existing stack, but not for a newly created stack.
|
|
90
108
|
*/
|
|
91
|
-
|
|
109
|
+
runIntegTestCase(runOptions: RunOptions): Promise<AssertionResults | undefined>;
|
|
110
|
+
private createSnapshot;
|
|
92
111
|
/**
|
|
93
|
-
*
|
|
112
|
+
* Runs cdk deploy --watch for an integration test
|
|
113
|
+
*
|
|
114
|
+
* This is meant to be run on a single test and will not create a snapshot
|
|
94
115
|
*/
|
|
95
|
-
|
|
96
|
-
actualTests(): Promise<{
|
|
97
|
-
[testName: string]: TestCase;
|
|
98
|
-
} | undefined>;
|
|
99
|
-
createCdkContextJson(): void;
|
|
116
|
+
watchIntegTest(options: WatchOptions): Promise<void>;
|
|
100
117
|
/**
|
|
101
118
|
* Checkout the snapshot directory at a specific git ref (tag, commit, branch).
|
|
102
119
|
* Fails fast if the snapshot does not exist at the given ref.
|
|
@@ -119,34 +136,16 @@ export declare class IntegTestRunner {
|
|
|
119
136
|
* all branches and we then search for one that starts with `HEAD branch: `
|
|
120
137
|
*/
|
|
121
138
|
private checkoutSnapshot;
|
|
122
|
-
/**
|
|
123
|
-
* Runs cdk deploy --watch for an integration test
|
|
124
|
-
*
|
|
125
|
-
* This is meant to be run on a single test and will not create a snapshot
|
|
126
|
-
*/
|
|
127
|
-
watchIntegTest(options: WatchOptions): Promise<void>;
|
|
128
|
-
/**
|
|
129
|
-
* Orchestrates running integration tests. Currently this includes
|
|
130
|
-
*
|
|
131
|
-
* 1. (if update workflow is enabled) Deploying the snapshot test stacks
|
|
132
|
-
* 2. Deploying the integration test stacks
|
|
133
|
-
* 2. Saving the snapshot (if successful)
|
|
134
|
-
* 3. Destroying the integration test stacks (if clean=false)
|
|
135
|
-
*
|
|
136
|
-
* The update workflow exists to check for cases where a change would cause
|
|
137
|
-
* a failure to an existing stack, but not for a newly created stack.
|
|
138
|
-
*/
|
|
139
|
-
runIntegTestCase(options: RunOptions): Promise<AssertionResults | undefined>;
|
|
140
139
|
/**
|
|
141
140
|
* Perform a integ test case stack destruction
|
|
142
141
|
*/
|
|
143
|
-
private
|
|
142
|
+
private destroyTestAndAssertions;
|
|
144
143
|
private watch;
|
|
145
144
|
/**
|
|
146
145
|
* Perform a integ test case deployment, including
|
|
147
146
|
* performing the update workflow
|
|
148
147
|
*/
|
|
149
|
-
private
|
|
148
|
+
private deployTestAndAssertions;
|
|
150
149
|
/**
|
|
151
150
|
* Process the outputsFile which contains the assertions results as stack
|
|
152
151
|
* outputs
|
|
@@ -157,4 +156,5 @@ export declare class IntegTestRunner {
|
|
|
157
156
|
*/
|
|
158
157
|
private parseError;
|
|
159
158
|
}
|
|
159
|
+
export {};
|
|
160
160
|
//# sourceMappingURL=integ-test-runner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integ-test-runner.d.ts","sourceRoot":"","sources":["integ-test-runner.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"integ-test-runner.d.ts","sourceRoot":"","sources":["integ-test-runner.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,iBAAiB,EAAuB,MAAM,gBAAgB,CAAC;AAG7E,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAmB,MAAM,mBAAmB,CAAC;AAkB9F,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,YAAa,SAAQ,aAAa;IACjD;;;;OAIG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,UAAW,SAAQ,aAAa;IAC/C;;;;;;;;OAQG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IAEzB;;;;;;;;OAQG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,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