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 additional tests for package namespaces (PackageReference) restore #11038

Closed
5 tasks done
kartheekp-ms opened this issue Jul 16, 2021 · 12 comments · Fixed by NuGet/NuGet.Client#4315
Closed
5 tasks done
Assignees
Labels
Area:PackageSourceMapping Issues related to the package source mapping feature Functionality:Restore Priority:2 Issues for the current backlog. Style:PackageReference Type:Test

Comments

@kartheekp-ms
Copy link
Contributor

kartheekp-ms commented Jul 16, 2021

NuGet/NuGet.Client#4149 (review)

Similarly to packages.config, we should a bunch of other scenarios.

For example:

Update:

@nkolev92
Copy link
Member

nkolev92 commented Sep 3, 2021

Moved this to the next sprint.

I would prioritize these tasks for the next sprint @kartheekp-ms

@nkolev92
Copy link
Member

nkolev92 commented Sep 3, 2021

Epics shouldn't have estimates themselves, but rather add up from the issues owned by it.

@nkolev92 nkolev92 removed the Epic label Sep 3, 2021
@nkolev92
Copy link
Member

nkolev92 commented Sep 3, 2021

@kartheekp-ms What is leftover here?

I tweaked in order to make planning obvious. Adding back the estimate.

@kartheekp-ms
Copy link
Contributor Author

Made some progress on this task: Added couple of tests for PMC Install/Update package scenarios for source mapping feature https://github.com/NuGet/NuGet.Client/tree/dev-kartheekp-ms-pmc-tests-pr-namespaces

I will create PR's next sprint.

@nkolev92
Copy link
Member

nkolev92 commented Sep 3, 2021

Please note that @erdembayar has a task about PMC tests in #11187.

Can you please consolidate and ensure that you're both not doing the same work/have dup issues?

Thanks!

@kartheekp-ms
Copy link
Contributor Author

kartheekp-ms commented Sep 7, 2021

@erdembayar here is the progress made on this issue so far.

Please let me know if I am missing anything.

@erdembayar
Copy link
Contributor

erdembayar commented Sep 16, 2021

@kartheekp-ms @nkolev92 @aortiz-msft
I tried to create test cases for PR type for Apex, End2end test.
But it looks we need whole new way of testing for package source mapping. Because each test for PR restore automatically put restored package into GPF but it pollutes restore environment for next package source mapping test.
So we have 3 choices:

  • Remove restored packages from GPF at end of test. But there're transitive packages so not straight forward. Most likely not practical.
  • Create new GPF with prepopulated necessary packages for each test then clean up at end of each test. But it'll increase our repository size by 100Mbs and it'll slow our tests.
  • Each test use new unique packages. Most likely not practical.

Maybe put it on hold for now, we need discussion next week on this.

@kartheekp-ms
Copy link
Contributor Author

@erdembayar - Can we use a custom globalPackageFolder setting the nuget.config file for every test so that the machines folders are untouched?

https://github.com/NuGet/Samples/blob/main/PackageSourceMappingExample/nuget.config#L6

@erdembayar
Copy link
Contributor

@erdembayar - Can we use a custom globalPackageFolder setting the nuget.config file for every test so that the machines folders are untouched?

https://github.com/NuGet/Samples/blob/main/PackageSourceMappingExample/nuget.config#L6

That is the 2nd option I proposed. In order to build NetCoreConsoleApp we need prepopulate Microsoft.NETCore.App, microsoft.codeanalysis.csharp etc quite many packages.

@erdembayar
Copy link
Contributor

erdembayar commented Sep 17, 2021

@erdembayar
Copy link
Contributor

Maybe we need to find solution leveraging Dartlab(download needed packages during machine provision instead of adding to repository) for this since Apex tests are moving to 1ES.

@nkolev92
Copy link
Member

nkolev92 commented Sep 20, 2021

We could consider adding our own templates, potentially ones that target .NET Framework instead.

Updating the used apex version might be a good idea s well.

We could investigate how other people run tests like that.

In general though, we should isolate the tests from impacting the global packages folder.

It really is the same feedback we've often had on the unit/integration tests themselves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area:PackageSourceMapping Issues related to the package source mapping feature Functionality:Restore Priority:2 Issues for the current backlog. Style:PackageReference Type:Test
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants