-
Notifications
You must be signed in to change notification settings - Fork 907
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
(maint) A few minor updates #3589
base: develop
Are you sure you want to change the base?
Conversation
Sometimes tests in Test Kitchen are run against versions of Chocolatey that are available on the setup repository, and so they are found as part of upgrade testing. The tests don't need these newer Chocolatey versions, nor do we expect to find them. This excludes all of the packages that are known to be on testing environments but not part of the test in question. This is to reduce the number of false positive tests we have, especially as we come up to a release.
This PR is draft until I can run the tests through Test Kitchen. I also need to update the testing steps to validate that the test failure is gone, but will need to think on the best way to do that. |
A few things I need to update about this before it's out of WIP. Adding here so I don't forget:
|
The $variables passed to the ForEach for these tests was found to be null, and so these tests weren't actually running. Upon looking at the tests, determined the ForEach variable was unintentional and was removed. The tests get the variable names in one order, and the .Net method to get the names presents them in a different order. Changed this to sort the list for both of them so that the Pester tests were consistent.
We use the Chocolatey Test Environment for testing packages on the Chocolatey Community Repository, so we should probably use it here for testing Chocolatey itself. This also adds a copy of the `testResults.xml` generated by Pester from the test system to the host system so it can be analyzed.
Ignore the file if it's testresult.xml or testresults.xml
Description Of Changes
choco list -lo
from the NuSpec file.upgrade all
test to ensure that it does not report failure if a newer Chocolatey version is available on internal repositories.Motivation and Context
list
command was removed in 2.0, and is an error now.2.4.1-beta-20241204
, but because of the way the builds work, CI will have build and published to our repository version2.5.0-alpha-20241204
which is deemed an upgrade for the pre-release version being tested.Testing
vagrant up
in thetests
directory.Operating Systems Testing
Change Types Made
Change Checklist
Related Issue
N/A - These are things that I found doing the recent 2.4.1 release.