-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Fix the CI build break #2806
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
Fix the CI build break #2806
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -158,15 +158,16 @@ function RunUpdateHelpTests | |
{ | ||
param ( | ||
[string]$tag = "CI", | ||
[switch]$useSourcePath | ||
[switch]$useSourcePath, | ||
[switch]$Pending | ||
) | ||
|
||
foreach ($moduleName in $modulesInBox) | ||
{ | ||
if ($powershellCoreModules -contains $moduleName) | ||
{ | ||
|
||
It "Validate Update-Help for module '$moduleName'" { | ||
It "Validate Update-Help for module '$moduleName'" -Pending:$Pending { | ||
|
||
# If the help file is already installed, delete it. | ||
Get-ChildItem $testCases[$moduleName].HelpInstallationPath -Include @("about_*.txt","*help.xml") -Recurse -ea SilentlyContinue | | ||
|
@@ -209,7 +210,8 @@ function RunUpdateHelpTests | |
function RunSaveHelpTests | ||
{ | ||
param ( | ||
[string]$tag = "CI" | ||
[string]$tag = "CI", | ||
[switch]$Pending | ||
) | ||
|
||
foreach ($moduleName in $modulesInBox) | ||
|
@@ -221,7 +223,7 @@ function RunSaveHelpTests | |
$saveHelpFolder = Join-Path $TestDrive (Get-Random).ToString() | ||
New-Item $saveHelpFolder -Force -ItemType Directory | ||
|
||
It "Validate Save-Help for the '$moduleName' module" { | ||
It "Validate Save-Help for the '$moduleName' module" -Pending:$Pending { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're introducing a new pattern here passing in the $Pending value. My preference is to just have -Pending on the relevant test cases rather than trying to pass it by the switch. One reason is I can search all the tests to see which ones are pending, but with this, I have to look at the code to determine if it's pending or not. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In this test, this single There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @SteveL-MSFT Do you have any further concerns? If not, I'd like to merge this PR to get CI running again There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @daxian-dbw I see, in that case, I guess it's ok. thanks. |
||
|
||
if ((Get-UICulture).Name -ne "en-Us") | ||
{ | ||
|
@@ -266,7 +268,7 @@ function ValidateSaveHelp | |
|
||
Describe "Validate Update-Help from the Web for one PowerShell Core module." -Tags @('CI', 'RequireAdminOnWindows') { | ||
|
||
RunUpdateHelpTests -tag "CI" | ||
RunUpdateHelpTests -tag "CI" -Pending | ||
} | ||
|
||
Describe "Validate Update-Help from the Web for all PowerShell Core modules." -Tags @('Feature', 'RequireAdminOnWindows') { | ||
|
@@ -285,7 +287,7 @@ Describe "Validate Update-Help -SourcePath for all PowerShell Core modules." -Ta | |
} | ||
|
||
Describe "Validate 'Save-Help -DestinationPath for one PowerShell Core modules." -Tags @('CI', 'RequireAdminOnWindows') { | ||
RunSaveHelpTests -tag "CI" | ||
RunSaveHelpTests -tag "CI" -Pending | ||
} | ||
|
||
Describe "Validate 'Save-Help -DestinationPath for all PowerShell Core modules." -Tags @('Feature', 'RequireAdminOnWindows') { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure why this changed, the pester message is harder to understand this way:
before:
now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was changed because I saw this test failed with error
expected {1000} to be greater than {1000}
. Maybe there is aShould BeGreaterOrEqualThan
?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or change to
should begreaterthan 999
we know it will be greater than that
Pester doesn't have a
BeGreaterOrEqual
assertion, but it's a good idea