Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add metadata to restore tests, make them go through the no-op codepath #10211

Closed
nkolev92 opened this issue Oct 30, 2020 · 0 comments · Fixed by NuGet/NuGet.Client#3747
Closed
Assignees
Labels
Area:RestoreNoOp The PackageReference no-op Functionality:Restore Priority:2 Issues for the current backlog. Tenet:Performance Performance issues Type:Test

Comments

@nkolev92
Copy link
Member

While I investigating #10068, I hit an known problem of the no-op codepath not being exercised in a good amount of unit test.

The reason is that the packagespec is not created with the same amount of details prod package spec would be.
In prod scenarios, all restores go through the restorerunner which calls https://github.com/NuGet/NuGet.Client/blob/c3219e49852add8371db25680a300cce5551ef00/src/NuGet.Core/NuGet.Commands/RestoreCommand/Utility/SpecValidationUtility.cs#L28 to validate that things like the RestoreMedata are not null or empty.

Now this is not a major problem for no-op, I have not discovered any regressions because of this, but it does not reflect what the actual restore code run is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area:RestoreNoOp The PackageReference no-op Functionality:Restore Priority:2 Issues for the current backlog. Tenet:Performance Performance issues Type:Test
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant