Commit 7a38a9a
[Test] Add comprehensive resize unit and smoke tests
Unit tests (17 total, 13 new):
- Scale-up is noop in pre-provision
- Same-size is noop
- Scale-down rejects RUNNING, SETTING_UP, and PENDING jobs
- Scale-down error message lists all in-progress job IDs
- Scale-down aborts on SSH failure (safety guard)
- Scale-down succeeds on idle cluster (terminates workers)
- Scale-down allows completed/failed/cancelled jobs
- Scale-down to 1 node (head-only)
- _check_existing_cluster uses task.num_nodes when resize=True
- _check_existing_cluster uses handle.launched_nodes when resize=False
- _check_existing_cluster warns (not errors) for non-existent cluster
- CLI --resize without -c raises UsageError
Smoke tests:
- Add test_resize_cli_validation: --resize without -c errors,
--resize on non-existent cluster warns and creates normally
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent f99daa8 commit 7a38a9a
2 files changed
Lines changed: 328 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3540 | 3540 | | |
3541 | 3541 | | |
3542 | 3542 | | |
| 3543 | + | |
| 3544 | + | |
| 3545 | + | |
| 3546 | + | |
| 3547 | + | |
| 3548 | + | |
| 3549 | + | |
| 3550 | + | |
| 3551 | + | |
| 3552 | + | |
| 3553 | + | |
| 3554 | + | |
| 3555 | + | |
| 3556 | + | |
| 3557 | + | |
| 3558 | + | |
| 3559 | + | |
| 3560 | + | |
| 3561 | + | |
| 3562 | + | |
| 3563 | + | |
0 commit comments