Commit c634a79
authored
feat(integ-tests-alpha): add option to set the provider log level (#38005)
### Issue # (if applicable)
Closes #<issue number here>.
### Reason for this change
Adds a providerLogLevel prop to the integ-tests assertions framework that controls the ApplicationLogLevel of the provider Lambda functions. Defaults to FATAL to suppress verbose logging, with the ability to increase it for debugging. This mirrors the change made to the custom-resources Provider framework.
### Description of changes
- Added ProviderOptions interface as a shared contract for provider configuration
- Set LoggingConfig.ApplicationLogLevel to FATAL by default on the provider Lambda
- All interfaces extend ProviderOptions so future provider-level config only needs one addition point
- Updated README with usage example
- Added unit tests for default behavior and override
Usage
```
import * as lambda from 'aws-cdk-lib/aws-lambda';
const integ = new IntegTest(app, 'MyTest', {
testCases: [stack],
providerLogLevel: lambda.ApplicationLogLevel.INFO,
});
```
### Description of how you validated changes
Added unit tests, deployed tests with `INFO` log level and `FATAL`.
### Checklist
- [X] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)
----
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*1 parent a7cc53c commit c634a79Copy full SHA for c634a79
10 files changed
+154-18Lines changed: 154 additions & 18 deletions
File tree
Expand file treeCollapse file tree
Open diff view settings
Filter options
- packages/@aws-cdk/integ-tests-alpha
- lib
- assertions
- private
- providers
- test/assertions
- providers
Expand file treeCollapse file tree
Open diff view settings
Collapse file
packages/@aws-cdk/integ-tests-alpha/README.md
Copy file name to clipboardExpand all lines: packages/@aws-cdk/integ-tests-alpha/README.md+16Lines changed: 16 additions & 0 deletions
- Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
478 | 478 | |
479 | 479 | |
480 | 480 | |
| 481 | + |
| 482 | + |
| 483 | + |
| 484 | + |
| 485 | + |
| 486 | + |
| 487 | + |
| 488 | + |
| 489 | + |
| 490 | + |
| 491 | + |
| 492 | + |
| 493 | + |
| 494 | + |
| 495 | + |
| 496 | + |
481 | 497 | |
482 | 498 | |
483 | 499 | |
|
Collapse file
packages/@aws-cdk/integ-tests-alpha/lib/assertions/assertions.ts
Copy file name to clipboardExpand all lines: packages/@aws-cdk/integ-tests-alpha/lib/assertions/assertions.ts+5-3Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
2 | 2 | |
3 | 3 | |
4 | 4 | |
5 | | - |
| 5 | + |
6 | 6 | |
7 | 7 | |
8 | 8 | |
9 | 9 | |
10 | 10 | |
11 | | - |
| 11 | + |
12 | 12 | |
13 | 13 | |
14 | 14 | |
| ||
44 | 44 | |
45 | 45 | |
46 | 46 | |
47 | | - |
| 47 | + |
| 48 | + |
| 49 | + |
48 | 50 | |
49 | 51 | |
50 | 52 | |
|
Collapse file
packages/@aws-cdk/integ-tests-alpha/lib/assertions/http-call.ts
Copy file name to clipboardExpand all lines: packages/@aws-cdk/integ-tests-alpha/lib/assertions/http-call.ts+10-3Lines changed: 10 additions & 3 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
| 2 | + |
2 | 3 | |
3 | 4 | |
4 | 5 | |
5 | 6 | |
6 | | - |
| 7 | + |
7 | 8 | |
8 | 9 | |
9 | 10 | |
10 | 11 | |
11 | 12 | |
12 | 13 | |
13 | 14 | |
14 | | - |
| 15 | + |
15 | 16 | |
16 | 17 | |
17 | 18 | |
18 | 19 | |
19 | 20 | |
20 | 21 | |
21 | 22 | |
| 23 | + |
22 | 24 | |
23 | 25 | |
24 | 26 | |
25 | 27 | |
| 28 | + |
| 29 | + |
26 | 30 | |
27 | 31 | |
28 | 32 | |
29 | 33 | |
30 | 34 | |
31 | | - |
| 35 | + |
| 36 | + |
| 37 | + |
32 | 38 | |
33 | 39 | |
34 | 40 | |
| ||
64 | 70 | |
65 | 71 | |
66 | 72 | |
| 73 | + |
67 | 74 | |
68 | 75 | |
69 | 76 | |
|
Collapse file
packages/@aws-cdk/integ-tests-alpha/lib/assertions/private/deploy-assert.ts
Copy file name to clipboardExpand all lines: packages/@aws-cdk/integ-tests-alpha/lib/assertions/private/deploy-assert.ts+8-2Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
1 | 2 | |
2 | 3 | |
3 | 4 | |
| ||
7 | 8 | |
8 | 9 | |
9 | 10 | |
10 | | - |
| 11 | + |
11 | 12 | |
12 | 13 | |
13 | 14 | |
| ||
17 | 18 | |
18 | 19 | |
19 | 20 | |
20 | | - |
| 21 | + |
21 | 22 | |
22 | 23 | |
23 | 24 | |
| ||
53 | 54 | |
54 | 55 | |
55 | 56 | |
| 57 | + |
56 | 58 | |
57 | 59 | |
58 | 60 | |
59 | 61 | |
60 | 62 | |
| 63 | + |
61 | 64 | |
62 | 65 | |
63 | 66 | |
| ||
73 | 76 | |
74 | 77 | |
75 | 78 | |
| 79 | + |
76 | 80 | |
77 | 81 | |
78 | 82 | |
| ||
93 | 97 | |
94 | 98 | |
95 | 99 | |
| 100 | + |
96 | 101 | |
97 | 102 | |
98 | 103 | |
| ||
105 | 110 | |
106 | 111 | |
107 | 112 | |
| 113 | + |
108 | 114 | |
109 | 115 | |
110 | 116 | |
|
Collapse file
packages/@aws-cdk/integ-tests-alpha/lib/assertions/providers/provider.ts
Copy file name to clipboardExpand all lines: packages/@aws-cdk/integ-tests-alpha/lib/assertions/providers/provider.ts+21-4Lines changed: 21 additions & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
| 2 | + |
2 | 3 | |
3 | 4 | |
4 | 5 | |
| ||
15 | 16 | |
16 | 17 | |
17 | 18 | |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
18 | 31 | |
19 | 32 | |
20 | 33 | |
21 | | - |
| 34 | + |
22 | 35 | |
23 | 36 | |
24 | 37 | |
| ||
99 | 112 | |
100 | 113 | |
101 | 114 | |
| 115 | + |
| 116 | + |
| 117 | + |
| 118 | + |
102 | 119 | |
103 | 120 | |
104 | 121 | |
| ||
110 | 127 | |
111 | 128 | |
112 | 129 | |
113 | | - |
114 | | - |
115 | | - |
| 130 | + |
116 | 131 | |
117 | 132 | |
118 | 133 | |
| ||
170 | 185 | |
171 | 186 | |
172 | 187 | |
| 188 | + |
173 | 189 | |
174 | 190 | |
175 | 191 | |
| ||
245 | 261 | |
246 | 262 | |
247 | 263 | |
| 264 | + |
248 | 265 | |
249 | 266 | |
250 | 267 | |
|
Collapse file
packages/@aws-cdk/integ-tests-alpha/lib/assertions/sdk.ts
Copy file name to clipboardExpand all lines: packages/@aws-cdk/integ-tests-alpha/lib/assertions/sdk.ts+8-1Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
1 | 2 | |
2 | 3 | |
3 | 4 | |
4 | 5 | |
5 | 6 | |
6 | 7 | |
7 | 8 | |
| 9 | + |
8 | 10 | |
9 | 11 | |
10 | 12 | |
11 | 13 | |
12 | 14 | |
13 | 15 | |
14 | | - |
| 16 | + |
15 | 17 | |
16 | 18 | |
17 | 19 | |
| ||
74 | 76 | |
75 | 77 | |
76 | 78 | |
| 79 | + |
77 | 80 | |
78 | 81 | |
79 | 82 | |
80 | 83 | |
| 84 | + |
| 85 | + |
81 | 86 | |
82 | 87 | |
| 88 | + |
83 | 89 | |
84 | 90 | |
85 | 91 | |
| ||
141 | 147 | |
142 | 148 | |
143 | 149 | |
| 150 | + |
144 | 151 | |
145 | 152 | |
146 | 153 | |
|
Collapse file
packages/@aws-cdk/integ-tests-alpha/lib/assertions/waiter-state-machine.ts
Copy file name to clipboardExpand all lines: packages/@aws-cdk/integ-tests-alpha/lib/assertions/waiter-state-machine.ts+4-1Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
2 | 2 | |
3 | 3 | |
4 | 4 | |
| 5 | + |
5 | 6 | |
6 | 7 | |
7 | 8 | |
8 | 9 | |
9 | | - |
| 10 | + |
10 | 11 | |
11 | 12 | |
12 | 13 | |
| ||
91 | 92 | |
92 | 93 | |
93 | 94 | |
| 95 | + |
94 | 96 | |
95 | 97 | |
96 | 98 | |
97 | 99 | |
98 | 100 | |
| 101 | + |
99 | 102 | |
100 | 103 | |
101 | 104 | |
|
Collapse file
packages/@aws-cdk/integ-tests-alpha/lib/test-case.ts
Copy file name to clipboardExpand all lines: packages/@aws-cdk/integ-tests-alpha/lib/test-case.ts+5-4Lines changed: 5 additions & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
3 | 3 | |
4 | 4 | |
5 | 5 | |
6 | | - |
| 6 | + |
7 | 7 | |
8 | 8 | |
9 | 9 | |
| ||
12 | 12 | |
13 | 13 | |
14 | 14 | |
15 | | - |
| 15 | + |
16 | 16 | |
17 | 17 | |
18 | 18 | |
| ||
44 | 44 | |
45 | 45 | |
46 | 46 | |
47 | | - |
| 47 | + |
48 | 48 | |
49 | 49 | |
50 | 50 | |
| ||
118 | 118 | |
119 | 119 | |
120 | 120 | |
121 | | - |
| 121 | + |
122 | 122 | |
123 | 123 | |
124 | 124 | |
| ||
166 | 166 | |
167 | 167 | |
168 | 168 | |
| 169 | + |
169 | 170 | |
170 | 171 | |
171 | 172 | |
|
0 commit comments