[release/v7.4] Fix a preview detection test for the packaging script#26894
Open
TravisEz13 wants to merge 1 commit intoPowerShell:release/v7.4from
Open
[release/v7.4] Fix a preview detection test for the packaging script#26894TravisEz13 wants to merge 1 commit intoPowerShell:release/v7.4from
TravisEz13 wants to merge 1 commit intoPowerShell:release/v7.4from
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR backports a test fix from #26882 to the release/v7.4 branch. The change refactors a preview detection test in the packaging script to use parameterized test cases, improving test coverage for both preview and RC version strings.
Changes:
- Converted a single test case into a parameterized test with two test cases covering both "preview" and "rc" version strings
- Simplified test code by removing redundant verification of the incorrect logic
- Enhanced test description to include the variant being tested via
<Name>placeholder
Comments suppressed due to low confidence (1)
test/packaging/packaging.tests.ps1:56
- The test cases define a
Nameproperty (@{ Version = "7.6.0-preview.6"; Name = "Preview" }), but the param block only declares$Version. According to Pester conventions (as seen throughout the codebase), all properties in test case hashtables must be declared in the param block, even if they're only used in the test description via<Name>.
The param block should declare both parameters:
param($Version, $Name)
param($Version)
Contributor
|
This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #26882 to release/v7.4
Triggered by @TravisEz13 on behalf of @daxian-dbw
Original CL Label: CL-BuildPackaging
/cc @PowerShell/powershell-maintainers
Impact
REQUIRED: Choose either Tooling Impact or Customer Impact (or both). At least one checkbox must be selected.
Tooling Impact
Fixes a preview detection test in the packaging script that is needed for correct package release validation.
Customer Impact
Regression
REQUIRED: Check exactly one box.
This is not a regression.
Testing
Test verified by running packaging script on release/v7.4 branch. Confirming preview detection works correctly in test suite.
Risk
REQUIRED: Check exactly one box.
This is a test fix for the packaging script. Tests do not execute in production, and the change is localized to test validation. Risk is minimal.