Skip to content

test(clusterapi): assert the EKS ownership guard refuses Start, not only StopΒ #6477

Description

@devantler

πŸ€– Generated by the Agentic Engineer

Evidence

Start and Stop both route through runLifecycleAction β†’ runGuardedProvisioner
(pkg/cli/clusterapi/local_service.go:840), so both carry the EKS ownership guard. The test suite
covers that refusal for Stop only β€” TestStopEKSRefusesWhenOwnershipCannotBeVerified β€” with no
Start equivalent.

Measured while validating #6203: ablating the guard flips 9 tests, none of which exercise Start.

Affected audience and impact

No user-visible gap today: the protection is shared by construction, so Start is guarded. The risk
is regression-shaped β€” a future refactor that gives Start its own path (or reorders the guard for
one action) would lose the ownership check on Start with the suite still fully green.

Expected behaviour

The guard's refusal is asserted for every guarded mutation, not just delete and stop.

Acceptance criteria

  • A Start arm asserts the mutation is refused when ownership cannot be verified, mirroring
    TestStopEKSRefusesWhenOwnershipCannotBeVerified.
  • The new arm fails when the guard is ablated (a passing test that survives the ablation is proving
    nothing).

Rough size

Small β€” one test arm in pkg/cli/clusterapi.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    βœ… Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions