Skip to content

test: split Docker host executor tests by concern - #11838

Merged
lpcox merged 2 commits into
mainfrom
copilot/refactor-split-docker-host-executor-test
Nov 19, 2026
Merged

lpcox merged 2 commits into
mainfrom
copilot/refactor-split-docker-host-executor-test

Conversation

@lpcox

@lpcox lpcox commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

The 1,480-line Docker host executor suite mixes invocation, diagnostics retention, recovery, and cancellation/revocation coverage.

  • Focused suites: Separate the four concerns into dedicated test modules.
  • Shared fixtures: Extract temporary storage setup, executor construction, and Docker mocks into a test utility.
  • Behavior preserved: Retain all 121 cases, assertions, Linux-only gating, ordering within each suite, and cleanup timing. No production changes.

@lpcox lpcox changed the title [WIP] Refactor docker-host-executor test into focused modules test: split Docker host executor tests by concern Nov 19, 2026
@lpcox
lpcox marked this pull request as ready for review November 19, 2026 17:00
Copilot AI adaptive review requested due to automatic review settings November 19, 2026 17:00

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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)

@github-actions

Copy link
Copy Markdown
Contributor

✅ Copilot review passed with no inline comments.

@lpcox Add the ready-for-aw label to this PR to trigger agentic CI smoke tests.

@lpcox
lpcox merged commit 880286e into main Nov 19, 2026
47 of 48 checks passed
@lpcox
lpcox deleted the copilot/refactor-split-docker-host-executor-test branch November 19, 2026 18:46
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.

[Refactoring] Split src/enclave/docker-host-executor.test.ts into focused modules

3 participants