Skip to content

Split main-action tests into focused suites - #11836

Merged
lpcox merged 3 commits into
mainfrom
copilot/refactor-split-main-action-test
Nov 19, 2026
Merged

lpcox merged 3 commits into
mainfrom
copilot/refactor-split-main-action-test

Conversation

@lpcox

@lpcox lpcox commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

The 1,847-line main-action test file mixes argument handling, workflow execution, security-critical cleanup, and config artifacts.

  • Focused suites: Separate argument parsing, workflow execution, cleanup, and config artifacts; group cleanup-helper cases with teardown coverage.
  • Preserved behavior: Retain all test bodies, lifecycle hooks, and per-file Jest mocks. No production code changes.
  • CI integration: Replace the removed file’s explicit enclave-conformance selector with the four new suite paths.

@lpcox lpcox changed the title [WIP] Refactor and split main-action test into focused modules Split main-action tests into focused suites 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

Because the refactor redistributes security-critical cleanup tests across four Jest environments, duplicates lifecycle setup, and changes conformance selection, CI should verify mock isolation and coverage when run together before approval.

No open issues 🎉

What changed in this PR

This pull request splits the monolithic main-action Jest test suite into focused argument-parsing, workflow, cleanup, and config-artifact suites while preserving existing behavior and updating Cloud Hypervisor conformance CI.

Changes:

  • Replaces the monolithic test file with four focused suites.
  • Preserves existing mocks, lifecycle hooks, cleanup coverage, and test bodies.
  • Updates the enclave conformance workflow to run all four replacement suites.
File Description
src/​commands/​main-action.test.ts Removes the monolithic main-action test suite.
src/​commands/​main-action-workflow.test.ts Covers workflow execution, runtime setup, diagnostics, and startup-failure behavior.
src/​commands/​main-action-config-artifacts.test.ts Covers configuration redaction, resolved-config artifacts, and related helper behavior.
src/​commands/​main-action-cleanup.test.ts Covers cleanup orchestration, teardown ordering, diagnostics, and signal-handling behavior.
src/​commands/​main-action-argument-parsing.test.ts Covers argument handling, reflection mode, and work-directory selection.
.github/​workflows/​test-cloud-hypervisor-enclaves.yml Runs the four replacement test suites during Cloud Hypervisor enclave conformance.

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 afab67a into main Nov 19, 2026
45 of 48 checks passed
@lpcox
lpcox deleted the copilot/refactor-split-main-action-test branch November 19, 2026 19:15
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/commands/main-action.test.ts into focused modules

3 participants