Skip to content

Add E2E test for global.json paths-driven SDK install directory#53897

Draft
Copilot wants to merge 2 commits intorelease/dnupfrom
copilot/add-install-logic-for-global-json
Draft

Add E2E test for global.json paths-driven SDK install directory#53897
Copilot wants to merge 2 commits intorelease/dnupfrom
copilot/add-install-logic-for-global-json

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 15, 2026

The existing InstallViaGlobalJson_SdkUsesGlobalJsonSource E2E test only covered version/rollForward in global.json — there was no test verifying that the paths field actually directs dotnetup to install the SDK into the specified local directory.

Changes

  • New E2E test InstallViaGlobalJson_PathsDirectsSdkToLocalDirectory in LifecycleEndToEndTests:
    • Creates a global.json with "paths": [".dotnet"], "version": "9.0.103", and "rollForward": "disable"
    • Runs dotnetup sdk install without --install-path, exercising the InstallPathResolver path that falls through to GlobalJsonInfo.SdkPath
    • Asserts the SDK directory exists at <project-dir>/.dotnet/sdk/9.0.103/
    • Asserts the manifest records the root under the paths-resolved directory with InstallSource.GlobalJson and the correct GlobalJsonPath
{
  "sdk": {
    "version": "9.0.103",
    "rollForward": "disable",
    "paths": [".dotnet"]
  }
}

The implementation under test (GlobalJsonInfo.SdkPath, InstallPathResolver.Resolve) was already in place; this test closes the coverage gap.

Copilot AI linked an issue Apr 15, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Add install logic for global.json parsing Add E2E test for global.json paths-driven SDK install directory Apr 15, 2026
Copilot AI requested a review from nagilson April 15, 2026 19:08
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.

Add Install Logic for Global.Json

2 participants