Commit 5ec26e5
committed
test(integ): cover the #1430 EventBridgeEnabled pair in the s3-lifecycle fixture
The unit tests pin the translation; this proves it against real AWS, and the
expected values are CloudFormation ground truth rather than a guess - a real
CFn A/B of this exact shape (stack Cdkd1430EbProbe, us-east-1) returned an
EMPTY body for `EventBridgeEnabled: false` and `{"EventBridgeConfiguration":
{}}` for `true`.
`s3-lifecycle` is the right home: it already carries an L1 `CfnBucket` for
precisely this class - CFn spellings the L2 cannot emit that cdkd dropped -
and it has no custom resource in the path. L1 is required rather than
stylistic, because the L2's `eventBridgeEnabled` routes through a
Custom::S3BucketNotifications custom resource that never reaches
`S3BucketProvider`'s own NotificationConfiguration handling.
The `false` half rides on the existing LegacyBucket; the `true` half is its
own bucket, and it is asserted FIRST as the vacuity guard - asserting only
that the `false` bucket lacks the block would pass just as happily if cdkd
stopped applying NotificationConfiguration altogether.
A `cdkd drift` call on the clean stack covers the read side: pre-fix,
`readCurrentState` returned the SDK's `{}` against a CFn-shaped state
baseline, so the boolean read back as permanently missing.
Both captures normalize an empty response body to `{}` before jq sees it. An
unconfigured bucket returns an EMPTY body, not `{}` - the exact shape
CloudFormation produces for the `false` case - and jq given empty input emits
nothing, so the assertion failed on cdkd's CORRECT output. The first real run
of this fixture did exactly that.
Run: PASS, 3 phases, destroy 3 deleted / 0 errors / 0 orphans.1 parent 29f680f commit 5ec26e5
3 files changed
Lines changed: 89 additions & 1 deletion
File tree
- docs/_generated
- tests/integration/s3-lifecycle
- lib
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
233 | | - | |
| 233 | + | |
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
115 | 132 | | |
116 | 133 | | |
117 | 134 | | |
| |||
131 | 148 | | |
132 | 149 | | |
133 | 150 | | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
134 | 161 | | |
135 | 162 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
86 | 89 | | |
87 | 90 | | |
88 | 91 | | |
| |||
97 | 100 | | |
98 | 101 | | |
99 | 102 | | |
| 103 | + | |
100 | 104 | | |
101 | 105 | | |
102 | 106 | | |
| |||
204 | 208 | | |
205 | 209 | | |
206 | 210 | | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
207 | 267 | | |
208 | 268 | | |
209 | 269 | | |
| |||
241 | 301 | | |
242 | 302 | | |
243 | 303 | | |
| 304 | + | |
244 | 305 | | |
245 | 306 | | |
246 | 307 | | |
| |||
0 commit comments