Skip to content

test(control-plane): separate orchestration tests from EC2 provider tests #5236

Description

@edersonbrilhante

Problem

PR #5234 moves the EC2 implementation into the shared runner-provider package. Two EC2 test files still contain a mixture of generic control-plane orchestration tests and EC2-specific provider tests:

  • lambdas/libs/runner-providers/aws/ec2/src/control-plane/scale-up.test.ts
  • lambdas/libs/runner-providers/aws/ec2/src/control-plane/scale-down.test.ts

To preserve the existing coverage without making that refactor harder to review, these files temporarily import control-plane modules through ../../../../../../functions/control-plane.

The tests cannot be moved as complete files: individual orchestration cases need to move to the control-plane package while EC2 implementation cases remain beside the provider.

Scope

  • Identify tests that exercise generic control-plane scale-up and scale-down orchestration.
  • Move those cases to lambdas/functions/control-plane and test them through provider interfaces or the existing provider contracts.
  • Keep EC2-specific behavior, including EC2 resource operations and dynamic configuration, under lambdas/libs/runner-providers/aws/ec2.
  • Remove direct imports and mocks from the EC2 provider tests into functions/control-plane.
  • Preserve the existing behavioral coverage while separating ownership clearly.

Acceptance criteria

  • No test under lambdas/libs/runner-providers imports from lambdas/functions/control-plane.
  • Generic orchestration tests are owned by the control-plane package.
  • EC2 implementation tests remain owned by the EC2 provider package.
  • Runner-provider and control-plane test suites pass.
  • Coverage scopes and thresholds remain valid after the tests are separated.
  • Production behavior is unchanged.

Related work

Activity

  1. added a commit that references this issue on Aug 12, 2026
    e45602b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions