Skip to content

Split mount-tree tests into focused suites - #11834

Merged
lpcox merged 2 commits into
mainfrom
copilot/refactor-split-mount-tree-tests
Nov 19, 2026
Merged

lpcox merged 2 commits into
mainfrom
copilot/refactor-split-mount-tree-tests

Conversation

@lpcox

@lpcox lpcox commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

The 1,290-line mount-tree suite mixes helper checks with security-critical mount enforcement tests.

  • Focused suites: Separate helper functions, staging/remount/rollback behavior, and masked paths.
  • Shared fixtures: Extract the mount-table fake and staging utilities; keep helper tests independent of those fixtures.
  • Preserved behavior: Retain all existing cases and staged-tree assertions. No production code changes.

@lpcox lpcox changed the title [WIP] Refactor split mount-tree.test.ts into focused modules Split mount-tree 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.

🟢 Approval recommended

No active review issues block approval of the mount-tree test refactor.

No open issues 🎉

What changed in this PR

Refactors the Cloud Hypervisor mount-tree tests into focused suites, addressing #11828 without changing production code.

Changes:

  • Separates helper checks, staging/remount/rollback tests, and masked-path tests.
  • Extracts shared mount-table and staging fixtures while keeping helper tests independent.
  • Preserves existing test cases and mount-enforcement assertions.
File Description
src/​cloud-hypervisor/​staged-host-mount-tree.test.ts Retains staging, remount, and rollback coverage using shared fixtures.
src/​cloud-hypervisor/​staged-host-mount-tree-masked-paths.test.ts Isolates masked-path behavior and validation tests.
src/​cloud-hypervisor/​mount-tree.test-utils.ts Provides shared mount-table fakes and staging utilities.
src/​cloud-hypervisor/​mount-tree-helpers.test.ts Isolates mount-plan selection, tool-version checks, and mountinfo parsing tests.

Review effort: Balanced (adaptive)

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Coverage Regression Detected

This PR decreases test coverage. Please add tests to maintain coverage levels.

Overall Coverage

Metric Base PR Delta
Lines 94.35% 94.35% ➡️ +0.00%
Statements 92.96% 92.95% ➡️ -0.01%
Functions 93.55% 93.53% 📉 -0.02%
Branches 87.23% 87.22% 📉 -0.01%
📁 Per-file Coverage Changes (2 files)
File Lines (Before → After) Statements (Before → After)
src/nvx/one-shot-process.ts 84.0% → 81.5% (-2.47%) 76.8% → 74.7% (-2.11%)
src/routing/bootstrap.ts 91.0% → 90.0% (-1.00%) 86.6% → 85.3% (-1.34%)
✨ New Files (1 files)
  • src/cloud-hypervisor/mount-tree.test-utils.ts: 96.9% lines

Coverage comparison generated by scripts/ci/compare-coverage.ts

@lpcox
lpcox merged commit d43f8c4 into main Nov 19, 2026
47 of 50 checks passed
@lpcox
lpcox deleted the copilot/refactor-split-mount-tree-tests branch November 19, 2026 18:45
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/cloud-hypervisor/mount-tree.test.ts into focused modules

3 participants