Commit 6e2fe60
committed
test(validator): make the fall-through guard actually reach the branch
The regression row added last round could not fail. It seeded the fake with
completeTrainerInstall(), so the first probe in ensureTrainerInstalled succeeded,
waitForDeclaredTrainer was never entered, and the row exercised the same path as
the one above it. A guard that passes whether or not the bug is present is worse
than no guard, because it reports coverage it does not have.
Replaced with a stateful fake reproducing the state the fall-through actually
lived in: incomplete on the first probe, complete on a later one, which is what a
chart still landing looks like. The test asserts no resources were claimed for
cleanup and that the probe ran more than once, so it fails if the wait is never
entered.
Verified by control: reintroducing the fall-through makes it fail, and restoring
the fix makes it pass.
Also carries discovery's own reason out of isTrainerInstalled instead of
flattening it to a bare false. 'No admission configuration at all' and 'the
configuration exists but names no Service' are different fixes, and both are
reachable during the rollout this PR now waits through.
Corrects the doc comment that still claimed the same recipe behaves identically
regardless of live state. What the recipe determines is what a missing
installation *means*; execution still differs across the undeclared rows, which
is why that wording was withdrawn in #2297.
Refs #2297
Signed-off-by: Yuan Chen <yuanchen97@gmail.com>1 parent c3abeb3 commit 6e2fe60
2 files changed
Lines changed: 63 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
277 | 279 | | |
278 | 280 | | |
279 | 281 | | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | 282 | | |
290 | 283 | | |
291 | 284 | | |
| |||
362 | 355 | | |
363 | 356 | | |
364 | 357 | | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
253 | | - | |
| 253 | + | |
254 | 254 | | |
255 | 255 | | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
256 | 263 | | |
257 | 264 | | |
258 | 265 | | |
| |||
456 | 463 | | |
457 | 464 | | |
458 | 465 | | |
459 | | - | |
460 | | - | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
461 | 471 | | |
462 | 472 | | |
463 | 473 | | |
| |||
0 commit comments