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 Pester Tests to Support branch #1035

Merged
merged 4 commits into from
Dec 21, 2023

Conversation

corbob
Copy link
Member

@corbob corbob commented Dec 20, 2023

Description Of Changes

Update the pester tests to be consistent with the other Chocolatey repositories.

Motivation and Context

Consistency in Pester test location and behaviour.

Testing

These pester tests are not currently part of any Test Kitchen environment. As such, the only tests we have are a manual running of these tests:

  1. Install Chocolatey CLI in Windows Sandbox.
  2. Install chocolateygui and pester packages.
  3. Run Invoke-Pester in the tests/pester-tests directory.

image

Note: these are the tests that were done for #1033. The screenshot is copied from there, but the output was the same for the 1.x releases of Chocolatey CLI and Chocolatey GUI.

Operating Systems Testing

Windows 10 22H2

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.
  • Pester test changes

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

N/A

Since we have a CLI for Chocolatey GUI, add some basic tests to ensure
it runs. This first set will only catch the most egregious errors, but
we can expand on them as we go.
Extract Get-GuiFeature to allow to fetch features and reduce code
duplication in the future. Update the module import to work without Test
Kitchen since this currently isn't designed for Test Kitchen.
The pester tests in the rest of the Chocolatey repositories reside in a
tests/pester-tests directory. This moves the tests to be consistent with
the other repositories.
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 gep13 merged commit 1426781 into chocolatey:support/1.x Dec 21, 2023
2 checks passed
@gep13
Copy link
Member

gep13 commented Dec 21, 2023

@corbob thanks for getting these moved over to the support branch!

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