Skip to content

Move system-dependent unit coverage to functional components - #2163

Draft
Tyrie Vella (tyrielv) wants to merge 4 commits into
microsoft:masterfrom
tyrielv:tyrielv/isolated-unit-tests
Draft

Tyrie Vella (tyrielv) wants to merge 4 commits into
microsoft:masterfrom
tyrielv:tyrielv/isolated-unit-tests

Conversation

@tyrielv

@tyrielv Tyrie Vella (tyrielv) commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Problem and Context

Unit tests currently start Git, shell commands, and the mount executable, and use real HTTP and named-pipe connections.
These dependencies require machine setup and place integration failures in the unit-test gate.
The real behavior checks remain important and must not disappear behind mocks.

Merge order: #2162 first, then this PR.
This branch contains the current head of #2162 and adds the test migration on top.
Functional tests use the same Git installation resolver as GVFS.

Changes

  • Move 92 existing integration cases into local component fixtures within the existing functional test project.
  • Preserve real Git authentication matching, configuration precedence, credential-file locks, worktree settings, and Git/libgit2 comparisons.
  • Preserve process timeout, output-callback, argument round-trip, and mount executable exit-code checks.
  • Preserve loopback HTTP timeout, status, credential-policy, connection-permit, and cancellation-ownership checks.
  • Preserve named-pipe telemetry delivery, reconnect, mount-error, and connection-timeout checks.
  • Keep isolated policy, parser, controlled-stream, and filesystem-only libgit2 tests in the unit suite.
  • Keep native hook executable tests and deterministic in-process Windows API tests in the unit suite.
  • Reuse shared test support and isolate configuration and environment state in the migrated fixtures.
  • Resolve Git through the product platform API. Use that installation for Bash and every local Git fixture.
  • Resolve the mount executable beside the selected payload.
  • Run local component fixtures through the existing functional runner and service lifecycle in PR-build and release-build jobs.
  • Reject empty selections, unexpected tests, and skipped local component cases in the targeted CI entry point.
  • Document the local component exception to the black-box functional-test convention. These fixtures call product APIs without a mounted enlistment or remote repository.

Find Git through PATH instead of a fixed system installation directory.
Share the resolver across the Git-dependent test fixtures.
Preserve missing-Git failure and skip policies.
Keep metadata-only worktree tests on a mock Git path.

Add filesystem-only tests for search order, quoted directories, empty
entries, relative paths, and absent Git.

Assisted-by: GPT-6.1 Sol
Signed-off-by: Tyrie Vella <tyrielv@gmail.com>
Keep semicolons inside quoted PATH directories.
Add a filesystem-only regression case for that directory shape.
Compare resolved Windows paths without case sensitivity.
Use one Git prerequisite guard across authentication test entry points.

Assisted-by: GPT-6.1 Sol
Signed-off-by: Tyrie Vella <tyrielv@gmail.com>
Preserve real Git, process, HTTP, and named-pipe checks in local functional
fixtures. Keep isolated policy, parser, filesystem, native hook, and
in-process Windows API coverage in the unit suite.

Run local functional components in PR and release build jobs through the
existing runner and service lifecycle.

Assisted-by: GPT-6.1 Sol
Signed-off-by: Tyrie Vella <tyrielv@gmail.com>
Use the product Git installation resolver for functional tests and derive
Bash from the same installation. Initialize the platform before settings.

Complete filesystem setup before environment mutation. Quote test result
paths and preserve the surviving unit fixture encoding.

Assisted-by: GPT-6.1 Sol
Signed-off-by: Tyrie Vella <tyrielv@gmail.com>
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.

1 participant