Skip to content

Update test to construct the version from $PSVersionTable.PSVersion - #5557

Closed
Dongbo Wang (daxian-dbw) wants to merge 1 commit into
PowerShell:masterfrom
daxian-dbw:FixCI
Closed

Dongbo Wang (daxian-dbw) wants to merge 1 commit into
PowerShell:masterfrom
daxian-dbw:FixCI

Conversation

@daxian-dbw

Copy link
Copy Markdown
Member

Two tests related to *-PSSessionConfiguration failed (see the failure below). The tests failed because the powershell built from the master branch is now with the version v6.1.0-preview.1, but we hardcoded the expected version to be 6.0. The fix is to generate the expected version from $PSVersionTable.PSVersion.

Describing Validate Register-PSSessionConfiguration, Set-PSSessionConfiguration cmdlets
   Context Validate Register-PSSessionConfiguration
    [-] Validate Register-PSSessionConfiguration -name -path 14.51s
      Expected: {6}
      But was:  {6.1}
      at line: 491 in C:\projects\powershell-f975h\test\powershell\Modules\Microsoft.PowerShell.Core\PSSessionConfiguration.Tests.ps1
      491:                     $Result.Session.PSVersion | Should be 6.0
   Context Validate Set-PSSessionConfiguration
    [-] Validate Set-PSSessionConfiguration -name -path -MaximumReceivedObjectSizeMB -MaximumReceivedDataSizePerCommandMB -UseSharedProcess -ThreadOptions parameters 27.69s
      Expected: {6}
      But was:  {6.1}
      at line: 560 in C:\projects\powershell-f975h\test\powershell\Modules\Microsoft.PowerShell.Core\PSSessionConfiguration.Tests.ps1
      560:                     $Result.Session.PSVersion | Should be 6.0

@adityapatwardhan

Copy link
Copy Markdown
Member

Dongbo Wang (@daxian-dbw) There is a PR open to resolve the issue. #5554

@daxian-dbw

Copy link
Copy Markdown
Member Author

Aditya Patwardhan (@adityapatwardhan) Ah, thanks. I forgot it.

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