1 Commits

Author SHA1 Message Date
nicktrn 0f349dd636 test(webapp): regression tests for resuming manually paused environments (#4127)
Follow-up to #4120, adding regression coverage for the pause/resume path
in `PauseEnvironmentService`.

Three tests against the real service with testcontainers Postgres (no
mocks), seeded org/project/environment rows, and the same
`AuthenticatedEnvironment` coercion production uses:

1. **resumes a manually paused env** - the actual regression: pause
leaves `pauseSource` null, resume must succeed. Verified this fails with
the exact pre-#4120 symptom (false billing-limit error) when the fix is
reverted locally.
2. **rejects resume of a billing-limit paused env** - the guard still
blocks manual resume while `pauseSource = BILLING_LIMIT`, and the env
stays paused.
3. **manual pause while billing-limit paused is a no-op** - returns
success without overwriting `pauseSource`, so billing-limit converge can
still find and unpause the environment.

Tests-only change, no runtime behavior touched.
2026-07-02 22:47:03 +01:00