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

(#886) Add tests for packages.config options #2830

Merged
merged 3 commits into from
Sep 26, 2022

Conversation

corbob
Copy link
Member

@corbob corbob commented Sep 23, 2022

Description Of Changes

Add tests for packages.config options to ensure they're being set properly.

This PR also adds debug logging so that Pester tests can see these options.

Motivation and Context

We added the ability to use these options, but didn't have tests to ensure they were working as intended. Case in point one of the Checksum Types was being set as the Checksum.

Testing

  1. Fetched the branch into Test Kitchen
  2. Ran Test Kitchen tests against the build from the build server.
  3. Ran the Testing Vagrantfile.

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)
  • PowerShell code changes
  • Tests

Related Issue

Fixes #886

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 v2 compatibility checked.

@coveralls
Copy link

coveralls commented Sep 23, 2022

Coverage Status

Coverage increased (+0.006%) to 27.584% when pulling 9062644 on corbob:a886_packages_config into 63c8cbd on chocolatey:develop.

@corbob corbob changed the title Add logging message for tests (#886) Add tests for packages.config options Sep 24, 2022
@corbob corbob force-pushed the a886_packages_config branch 2 times, most recently from 5d48bc5 to 5b24c47 Compare September 24, 2022 19:40
@corbob corbob self-assigned this Sep 26, 2022
@corbob corbob marked this pull request as ready for review September 26, 2022 14:31
When using a packages.config file, output the evaluated package
configuration to the debug stream so that it is available for
troubleshooting (and our Pester tests).

Also update the checksum type logic to store in the right property.
Add Pester tests to test the options passed via a packages.config file.
Update the packages.config to be easier to read in the Pester tests.
Update the configurations to use specific strings instead of all of them
being the same "string". This will allow us to identify that they are
actually what they're supposed to be.
Copy link
Member

@AdmiringWorm AdmiringWorm left a comment

Choose a reason for hiding this comment

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

LGTM

@AdmiringWorm AdmiringWorm merged commit b63b96a into chocolatey:develop Sep 26, 2022
@AdmiringWorm
Copy link
Member

@corbob thanks for noticing and fixing that bug that was added, as well as getting those E2E tests added 👍

@corbob corbob deleted the a886_packages_config branch September 26, 2022 15:16
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.

Packages.config should include all options (including ignorechecksums)
3 participants