Commit 1c940f3
authored
test: align runner tests with provider modules (github-aws-runners#5232)
## Description
Align test-file ownership with the runner-provider module layout
introduced in github-aws-runners#5203 and requested in github-aws-runners#5230.
This PR only renames or relocates existing tests. Provider-neutral tests
remain beside the shared orchestration modules, while EC2-specific tests
move beside their EC2 implementations.
I plan to create following PR to reduced some duplicated tests. I didn't
change in this PR to prevent a hard review
### Test cases moved or renamed
- Renamed `control-plane/src/aws/runners.test.ts` to
`ec2-runners.test.ts`.
- Renamed `webhook/src/runners/dynamic-labels-policy.test.ts` to
`ec2-dynamic-labels-policy.test.ts`.
- Moved 19 existing `canRunJob` test declarations from
`dispatch.test.ts` to `labels.test.ts`.
- Moved four existing AWS dynamic-label test declarations from
`dispatch.test.ts` to `aws-dynamic-labels.test.ts`.
- Moved three existing EC2 dynamic-label test declarations from
`dispatch.test.ts` to `ec2-dynamic-labels.test.ts`; 18 dispatch
integration tests remain in `dispatch.test.ts`.
- Moved four existing EC2 pool-size test declarations from
`pool.test.ts` to `ec2-pool.test.ts`; 17 provider-neutral pool tests
remain in `pool.test.ts`.
- Moved 20 existing EC2 scale-down test declarations from
`scale-down.test.ts` to `ec2-scale-down.test.ts`; four provider-neutral
eviction-order tests remain in `scale-down.test.ts`.
- Moved 251 existing EC2 scale-up test declarations from
`scale-up.test.ts` to `ec2-scale-up.test.ts`; the provider-selection
test remains in `scale-up.test.ts`.
### Test cases created
None.
### Duplicated test cases merged
None.
### Test cases deleted
None. The test titles and coverage from `origin/main` are preserved.
## Test Plan
- Renamed EC2 suites: 85 tests passed.
- Webhook runner suites: 44 tests passed.
- Pool suites: 21 tests passed.
- Scale-down suites: 130 tests passed.
- Scale-up suites: 254 tests passed.
- ESLint passed for every affected test file.
- `git diff --check` passed.
- Repository pre-commit hooks passed for all five commits.
## Related Issues
Closes github-aws-runners#52301 parent 9045340 commit 1c940f3
12 files changed
Lines changed: 4729 additions & 4664 deletions
File tree
- lambdas/functions
- control-plane/src
- aws
- pool
- scale-runners
- webhook/src/runners
Lines changed: 49 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
11 | | - | |
12 | 10 | | |
13 | 11 | | |
14 | 12 | | |
| |||
57 | 55 | | |
58 | 56 | | |
59 | 57 | | |
60 | | - | |
61 | 58 | | |
62 | 59 | | |
63 | 60 | | |
| |||
496 | 493 | | |
497 | 494 | | |
498 | 495 | | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | | - | |
523 | | - | |
524 | | - | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
0 commit comments