Repository navigation
test: split Docker host executor tests by concern - #11838
Merged
Merged
Conversation
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
lpcox
marked this pull request as ready for review
November 19, 2026 17:00
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Approval is deferred because the test-only refactor changes Jest mock initialization, fixture lifecycle, and cleanup ordering across security-sensitive suites, requiring runtime verification of ts-jest setup and isolation.
No open issues 🎉
What changed in this PR
Refactors the Docker host executor test suite into focused invocation, retention, recovery, and cancellation/revocation modules while preserving existing coverage and behavior. Production code is unchanged.
Changes:
- Split the monolithic suite into four concern-specific test files.
- Centralized shared fixtures, temporary storage setup, executor construction, Docker mocks, and lifecycle helpers.
- Preserved Linux gating, assertions, ordering, parameterized cases, and cleanup behavior.
| File | Description |
|---|---|
| src/enclave/docker-host-executor.test.ts | Removes the original monolithic Docker host executor test suite after its tests were migrated. |
| src/enclave/docker-host-executor.test-utils.ts | Provides shared fixtures, Docker mocks, temporary storage setup, executor helpers, constants, and lifecycle utilities. |
| src/enclave/docker-host-executor-retention.test.ts | Covers diagnostics retention, staging and cleanup failures, storage handling, and failure provenance. |
| src/enclave/docker-host-executor-recovery.test.ts | Covers container and journal validation, ownership checks, interrupted cleanup, and stopped-run recovery. |
| src/enclave/docker-host-executor-invocation.test.ts | Covers executor invocation, resource configuration, identities, mounts, schemas, networking, and related assertions. |
| src/enclave/docker-host-executor-cancellation.test.ts | Covers cancellation settlement, authority revocation, cleanup ordering, and closed-executor behavior. |
Review effort: Lite (adaptive)
Contributor
|
✅ Copilot review passed with no inline comments. @lpcox Add the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The 1,480-line Docker host executor suite mixes invocation, diagnostics retention, recovery, and cancellation/revocation coverage.