Skip to content

test: align runner tests with provider modules - #5232

Merged
edersonbrilhante merged 5 commits into
mainfrom
refactor-ec2-test-layout
Jul 31, 2026
Merged

test: align runner tests with provider modules#5232
edersonbrilhante merged 5 commits into
mainfrom
refactor-ec2-test-layout

Conversation

@edersonbrilhante

@edersonbrilhante edersonbrilhante commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Description

Align test-file ownership with the runner-provider module layout introduced in #5203 and requested in #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 #5230

@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@edersonbrilhante
edersonbrilhante marked this pull request as ready for review July 31, 2026 08:37
@edersonbrilhante
edersonbrilhante requested a review from a team as a code owner July 31, 2026 08:37
@edersonbrilhante
edersonbrilhante merged commit 1c940f3 into main Jul 31, 2026
10 of 11 checks passed
@edersonbrilhante
edersonbrilhante deleted the refactor-ec2-test-layout branch July 31, 2026 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor EC2 tests to match provider module layout

2 participants