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

(#3503, #3513) Add null check to Command Name #3553

Merged
merged 2 commits into from
Nov 6, 2024

Conversation

corbob
Copy link
Member

@corbob corbob commented Nov 6, 2024

Description Of Changes

  • Add a null check to the Command Name when determining if we should decrypt the stored arguments.
  • Exclude packages installed on Test Kitchen from the upgrade commands downgrade tests.

Motivation and Context

  • The CommandName is missing when calling the List method from alternate sources.
  • Test Kitchen has some extra packages on it that will get upgraded unless we exclude them.

Testing

  1. Run tests through Test Kitchen.

Operating Systems Testing

  • Windows Server 2016
  • Windows Server 2019

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.

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 v3 compatibility checked?

Related Issue

@corbob corbob self-assigned this Nov 6, 2024
@corbob corbob requested a review from vexx32 November 6, 2024 17:30
The CommandName is null when the list method is called during alternate
source commands.
Update the Pester tests to exclude the packages that are installed on
Test Kitchen. Without these exclusions the tests fail as it expects
only the packages being tested.
Copy link
Member

@vexx32 vexx32 left a comment

Choose a reason for hiding this comment

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

These changes look good to me, nice work!

@vexx32 vexx32 merged commit e0c728d into chocolatey:develop Nov 6, 2024
5 checks passed
@corbob corbob deleted the update-tests branch November 6, 2024 19:26
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