-
Notifications
You must be signed in to change notification settings - Fork 4k
Update smoke test script to support different PowerShell version #17579
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
Conversation
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.
The script works well in local environments including PowerShell Core and Windows PowerShell
if($null -ne $_.Since -and "Core" -eq $PSVersionTable.PSEdition) { | ||
if($PSVersionTable.PSVersion -lt [System.Version]$_.Since) { |
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.
if($null -ne $_.Since -and "Core" -eq $PSVersionTable.PSEdition) { | |
if($PSVersionTable.PSVersion -lt [System.Version]$_.Since) { | |
if($null -ne $_.Since -and "Core" -eq $PSVersionTable.PSEdition -and $PSVersionTable.PSVersion -lt [System.Version]$_.Since) { |
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.
Merged them into one line.
Retry-AzCommand -Name $testName -Command $script -Retry $retry -Sleep $sleep | ||
$testInfo.PassedCount += 1 |
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.
Retry-AzCommand -Name $testName -Command $script -Retry $retry -Sleep $sleep | |
$testInfo.PassedCount += 1 | |
Retry-AzCommand -Name $testName -Command $script -Retry $retry -Sleep $sleep | |
$testInfo.PassedCount += 1 |
Add a space to keep same indent.
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.
Updated the code. The problem indeed is indent of other lines is incorrect.
The script works well in local environments.
|
07fcba6
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.
Looks good to me.
Description
Checklist
CONTRIBUTING.md
ChangeLog.md
file(s) has been updated:ChangeLog.md
file can be found atsrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
## Upcoming Release
header -- no new version header should be added