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

(#508) Fix unit tests for new dependency handling #2917

Merged
merged 1 commit into from
Nov 25, 2022

Conversation

AdmiringWorm
Copy link
Member

Description Of Changes

The underlying framework NuGet.Client has changed how it
resolves dependencies. Because of this we no longer have
information about the dependencies that will be installed
until everything has completed its run successfully.

As such, if a failure happens during the dependency handling
we only show the amount of total packages that was passed
into the executable, instead of the old handling that also included
the dependencies.
For successful runs, even the dependencies will be listed as
the amount of total packages.

Motivation and Context

To get a working build for Chocolatey CLI.

Testing

  1. Run .\build.ps1 --testExecutionType=all --shouldRunOpenCover=false

Operating Systems Testing

  • Windows 10/11

Change Types Made

  • Bug fix (non-breaking change).
  • Feature / Enhancement (non-breaking change).
  • Breaking change (fix or feature that could cause existing functionality to change).
  • Documentation changes.
  • PowerShell code changes.
  • Tests

Change Checklist

  • Requires a change to the documentation.
  • Documentation has been updated.
  • Tests to cover my changes, have been added.
  • All new and existing tests passed?
  • PowerShell code changes: PowerShell v2 compatibility checked?

Related Issue

Related to #508

The underlying framework NuGet.Client has changed how it
resolves dependencies. Because of this we no longer have
information about the dependencies that will be installed
until everything has completed its run successfully.

As such, if a failure happens during the dependency handling
we only show the amount of total packages that was passed
into the executable, instead of the old handling that also included
the dependencies.
For successful runs, even the dependencies will be listed as
the amount of total packages.
@AdmiringWorm AdmiringWorm self-assigned this Nov 24, 2022
@AdmiringWorm AdmiringWorm requested a review from gep13 November 24, 2022 16:57
Copy link
Member

@gep13 gep13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@gep13
Copy link
Member

gep13 commented Nov 25, 2022

The failing builds on this PR are due to the fact that we haven't (yet) publishing the Chocolatey.NuGet.* packages to NuGet.org, and are only available internally. These packages will be pushed in due course.

@gep13 gep13 merged commit 305b546 into chocolatey:develop Nov 25, 2022
@gep13
Copy link
Member

gep13 commented Nov 25, 2022

@AdmiringWorm thanks for getting this fixed up!

@AdmiringWorm AdmiringWorm deleted the unit-tests-fix branch November 26, 2022 12:44
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.

2 participants