Migrate SyncPackageTest.ps1 PowerShell E2E tests to Apex C# tests#7270
Merged
Migrate SyncPackageTest.ps1 PowerShell E2E tests to Apex C# tests#7270
Conversation
Migrate all 3 tests from test/EndToEnd/tests/SyncPackageTest.ps1 to test/NuGet.Tests.Apex/NuGet.Tests.Apex/NuGetEndToEndTests/SyncPackageTestCase.cs: - Test-SyncPackagesInSolutionUp -> SyncPackageFromPMC_UpVersion_SyncsAllProjectsAsync - Test-SyncPackagesInSolutionDown -> SyncPackageFromPMC_DownVersion_SyncsAllProjectsAsync - Test-SyncPackagesInSolutionPlural -> SyncPackageFromPMC_MultipleProjects_SyncsAllProjectsAsync Remove the original PS test file. Agent-Logs-Url: https://github.com/NuGet/NuGet.Client/sessions/c06b5567-c16c-4ae8-9a1c-ccb07314f686 Co-authored-by: nkolev92 <[email protected]>
Copilot created this pull request from a session on behalf of
nkolev92
April 10, 2026 21:55
View session
nkolev92
approved these changes
Apr 13, 2026
Member
|
I verified the tests are passing in NuGet.Client-VS. |
jeffkl
approved these changes
Apr 13, 2026
Copilot stopped work on behalf of
nkolev92 due to an error
April 15, 2026 19:41
This was referenced Apr 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
Progress: https://github.com/nuget/client.engineering/issues/2085
Description
Migrates all 3 tests from
test/EndToEnd/tests/SyncPackageTest.ps1to a new Apex C# test classSyncPackageTestCase.csintest/NuGet.Tests.Apex/NuGet.Tests.Apex/NuGetEndToEndTests/. The original PowerShell test file is deleted.Migration Decision Table
Test-SyncPackagesInSolutionUpSyncPackageFromPMC_UpVersion_SyncsAllProjectsAsyncTest-SyncPackagesInSolutionDownSyncPackageFromPMC_DownVersion_SyncsAllProjectsAsyncTest-SyncPackagesInSolutionPluralSyncPackageFromPMC_MultipleProjects_SyncsAllProjectsAsyncApproach
ConsoleApplication(packages.config) +ClassLibrary(packages.config), matching the originalNew-ConsoleApplication/New-ClassLibraryPS helpersCommonUtility.CreateDependenciesPackageInSourceAsync()creates packages A with a declared dependency on B at corresponding versions, replacing$context.RepositoryPathlocal packagesnugetConsole.Execute()is used for allInstall-Package(with-Versionand-Source) andSync-PackagecommandstestContext.SolutionService.AddProject()CommonUtility.AssertPackageInPackagesConfig()andAssertPackageNotInPackagesConfig()replaceAssert-PackageandAssert-Null (Get-ProjectPackage ...)PR Checklist