Commit 1295a18
committed
test(live): assert weighted-capacity contract + fix ruff I001
- Multi-* termination tests conflated capacity_to_request (units) with
physical machine count. Weighted templates legitimately fulfil target
with fewer machines (e.g. one t3.medium weight=4 covers target=2).
Replace strict len(machines) == capacity_to_request with the actual
contract: fulfilled_units >= target_units. Preserve len(machines) >= 1
as observable side-effect check for downstream EC2 state assertions.
- Drop stray blank line after imports in _capacity_helpers.py that
tripped ruff I001 in CI-enforced lint.
- Apply ruff format wraps to _target/_fallback ternaries and terminal
status set literal.1 parent 3a1f9ed commit 1295a18
5 files changed
Lines changed: 52 additions & 27 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | 43 | | |
45 | 44 | | |
46 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
526 | 526 | | |
527 | 527 | | |
528 | 528 | | |
529 | | - | |
530 | | - | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
531 | 539 | | |
532 | | - | |
533 | | - | |
| 540 | + | |
| 541 | + | |
534 | 542 | | |
535 | | - | |
536 | | - | |
| 543 | + | |
537 | 544 | | |
538 | 545 | | |
539 | 546 | | |
| |||
Lines changed: 13 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
548 | 548 | | |
549 | 549 | | |
550 | 550 | | |
551 | | - | |
552 | | - | |
553 | | - | |
554 | | - | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
555 | 561 | | |
556 | | - | |
557 | | - | |
| 562 | + | |
| 563 | + | |
558 | 564 | | |
559 | | - | |
560 | | - | |
| 565 | + | |
561 | 566 | | |
562 | 567 | | |
563 | 568 | | |
| |||
Lines changed: 13 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
563 | 563 | | |
564 | 564 | | |
565 | 565 | | |
566 | | - | |
567 | | - | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
568 | 576 | | |
569 | | - | |
570 | | - | |
| 577 | + | |
| 578 | + | |
571 | 579 | | |
572 | | - | |
573 | | - | |
| 580 | + | |
574 | 581 | | |
575 | 582 | | |
576 | 583 | | |
| |||
Lines changed: 13 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
532 | 532 | | |
533 | 533 | | |
534 | 534 | | |
535 | | - | |
536 | | - | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
537 | 545 | | |
538 | | - | |
539 | | - | |
| 546 | + | |
| 547 | + | |
540 | 548 | | |
541 | | - | |
542 | | - | |
| 549 | + | |
543 | 550 | | |
544 | 551 | | |
545 | 552 | | |
| |||
0 commit comments