@aws-cdk-testing/cli-integ 3.11.0 → 3.12.1
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/README.md +24 -0
- package/lib/eventually.d.ts +4 -4
- package/lib/eventually.js +3 -3
- package/npm-shrinkwrap.json +1164 -1171
- package/package.json +10 -10
- package/resources/cdk-apps/app/app.js +4 -2
- package/skip-tests.txt +2 -1
package/README.md
CHANGED
|
@@ -124,6 +124,30 @@ $ publib-ca delete
|
|
|
124
124
|
2. In the `"args"` value after `"-t"`, place the name of the test that you'd like to run.
|
|
125
125
|
3. Press the VS code green arrow to launch the debugger.
|
|
126
126
|
|
|
127
|
+
### Running during PRs
|
|
128
|
+
|
|
129
|
+
Integration tests are executed automatically during PRs. Every workflow run generates a markdown summary
|
|
130
|
+
of the suite, detailing which tests passed/failed, and some additional statistics.
|
|
131
|
+
|
|
132
|
+
> For exmaple: https://github.com/aws/aws-cdk-cli/actions/runs/15305859516
|
|
133
|
+
|
|
134
|
+
To debug a failing test, navigate to the execution logs and search for the name of the test.
|
|
135
|
+
You'll find a verbose log that displays all operations taken during the test.
|
|
136
|
+
|
|
137
|
+
Unlike running locally, PRs make use of the *Atmosphere* service, an internal CDK service designed
|
|
138
|
+
to provide integration tests with clean AWS environments. It allows us to run many concurrent tests,
|
|
139
|
+
and significantly reduce suite durations. Most of the time, *Atmosphere* should be transparent to you,
|
|
140
|
+
but sometimes, tests that pass locally may fail during PRs because of additional restrictions
|
|
141
|
+
it imposes:
|
|
142
|
+
|
|
143
|
+
- **Service Control Policy (SCP):** AWS environments (i.e accounts) are subject to an SCP that denies access
|
|
144
|
+
to specific services. For example, you might see a failure similar to:
|
|
145
|
+
|
|
146
|
+
```
|
|
147
|
+
User: arn:aws:sts::111111111111:assumed-role/cdk-hnb659fds-cfn-exec-role-111111111111-eu-central-1/AWSCloudFormation is not authorized to perform: logs:CreateLogGroup on resource: arn:aws:logs:eu-central-1:111111111111:log-group:/aws/lambda/cdktest-00cyqupxno939-imp-cdkimportnodejslambdates-6X36hssZOiZk:log-stream: with an explicit deny in a service control policy
|
|
148
|
+
```
|
|
149
|
+
This means that your PR introduces a need to invoke a new service, or deploy a new type of resource, that wasn't previously required. When this happens - reach out to a maintainer through the PR. They will evaluate if the new requirement is justified, and grant the necessary permissions.
|
|
150
|
+
|
|
127
151
|
## Tools
|
|
128
152
|
|
|
129
153
|
There are a number of tools in the `bin/` directory. They are:
|
package/lib/eventually.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @param maxAttempts the maximum number of attempts
|
|
3
|
-
* @param interval interval in milliseconds to observe between attempts
|
|
2
|
+
* @param maxAttempts - the maximum number of attempts
|
|
3
|
+
* @param interval - interval in milliseconds to observe between attempts
|
|
4
4
|
*/
|
|
5
5
|
export type EventuallyOptions = {
|
|
6
6
|
maxAttempts?: number;
|
|
@@ -13,8 +13,8 @@ export type EventuallyOptions = {
|
|
|
13
13
|
* Default interval = 1000 milliseconds
|
|
14
14
|
* Default maxAttempts = 10
|
|
15
15
|
*
|
|
16
|
-
* @param fn function to run
|
|
17
|
-
* @param options EventuallyOptions
|
|
16
|
+
* @param fn - function to run
|
|
17
|
+
* @param options - EventuallyOptions
|
|
18
18
|
*/
|
|
19
19
|
declare const eventually: <T>(call: () => Promise<T>, options?: EventuallyOptions) => Promise<T>;
|
|
20
20
|
export default eventually;
|
package/lib/eventually.js
CHANGED
|
@@ -10,8 +10,8 @@ const DEFAULT_MAX_ATTEMPTS = 10;
|
|
|
10
10
|
* Default interval = 1000 milliseconds
|
|
11
11
|
* Default maxAttempts = 10
|
|
12
12
|
*
|
|
13
|
-
* @param fn function to run
|
|
14
|
-
* @param options EventuallyOptions
|
|
13
|
+
* @param fn - function to run
|
|
14
|
+
* @param options - EventuallyOptions
|
|
15
15
|
*/
|
|
16
16
|
const eventually = async (call, options) => {
|
|
17
17
|
const opts = {
|
|
@@ -31,4 +31,4 @@ const eventually = async (call, options) => {
|
|
|
31
31
|
throw new Error('An unexpected error has occurred.');
|
|
32
32
|
};
|
|
33
33
|
exports.default = eventually;
|
|
34
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
34
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXZlbnR1YWxseS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbImV2ZW50dWFsbHkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7QUFTQSxNQUFNLElBQUksR0FBRyxDQUFDLEVBQVUsRUFBaUIsRUFBRSxDQUFDLElBQUksT0FBTyxDQUFDLENBQUMsT0FBTyxFQUFFLEVBQUUsQ0FBQyxVQUFVLENBQUMsT0FBTyxFQUFFLEVBQUUsQ0FBQyxDQUFDLENBQUM7QUFDOUYsTUFBTSxnQkFBZ0IsR0FBRyxJQUFJLENBQUM7QUFDOUIsTUFBTSxvQkFBb0IsR0FBRyxFQUFFLENBQUM7QUFFaEM7Ozs7Ozs7OztHQVNHO0FBQ0gsTUFBTSxVQUFVLEdBQUcsS0FBSyxFQUFLLElBQXNCLEVBQUUsT0FBMkIsRUFBYyxFQUFFO0lBQzlGLE1BQU0sSUFBSSxHQUFHO1FBQ1gsUUFBUSxFQUFFLE9BQU8sRUFBRSxRQUFRLENBQUMsQ0FBQyxDQUFDLE9BQU8sQ0FBQyxRQUFRLENBQUMsQ0FBQyxDQUFDLGdCQUFnQjtRQUNqRSxXQUFXLEVBQUUsT0FBTyxFQUFFLFdBQVcsQ0FBQyxDQUFDLENBQUMsT0FBTyxDQUFDLFdBQVcsQ0FBQyxDQUFDLENBQUMsb0JBQW9CO0tBQy9FLENBQUM7SUFFRixPQUFPLElBQUksQ0FBQyxXQUFXLEVBQUUsSUFBSSxDQUFDLEVBQUUsQ0FBQztRQUMvQixJQUFJLENBQUM7WUFDSCxPQUFPLE1BQU0sSUFBSSxFQUFFLENBQUM7UUFDdEIsQ0F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