From 71ca7e5f19c8b37e5e9a63264e863a3ac7704772 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Thu, 23 Aug 2018 15:55:42 -0700 Subject: [PATCH 1/2] [feature] fix test failure preview versions are any version with dash in the name --- .../Microsoft.PowerShell.Core/PSSessionConfiguration.Tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/powershell/Modules/Microsoft.PowerShell.Core/PSSessionConfiguration.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Core/PSSessionConfiguration.Tests.ps1 index 31669f45525..f18782ec501 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Core/PSSessionConfiguration.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Core/PSSessionConfiguration.Tests.ps1 @@ -847,7 +847,7 @@ namespace PowershellTestConfigNamespace It "Enable-PSSession Cmdlet creates a default PSSession configuration untied to a specific PowerShell version." { $dotPos = $PSVersionTable.PSVersion.ToString().IndexOf(".") $endpointName = "PowerShell." + $PSVersionTable.PSVersion.ToString().Substring(0, $dotPos) - if ($PSVersionTable.GitCommitId.Contains("preview")) + if ($PSVersionTable.GitCommitId.Contains("-")) { $endpointName += "-preview" } From f6d04cf1e7e5c02fb2d24909fd31a34391c98202 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Thu, 23 Aug 2018 16:22:56 -0700 Subject: [PATCH 2/2] Add comment about the intention of the logic --- .../Microsoft.PowerShell.Core/PSSessionConfiguration.Tests.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/test/powershell/Modules/Microsoft.PowerShell.Core/PSSessionConfiguration.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Core/PSSessionConfiguration.Tests.ps1 index f18782ec501..f86eb6600ae 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Core/PSSessionConfiguration.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Core/PSSessionConfiguration.Tests.ps1 @@ -847,6 +847,7 @@ namespace PowershellTestConfigNamespace It "Enable-PSSession Cmdlet creates a default PSSession configuration untied to a specific PowerShell version." { $dotPos = $PSVersionTable.PSVersion.ToString().IndexOf(".") $endpointName = "PowerShell." + $PSVersionTable.PSVersion.ToString().Substring(0, $dotPos) + # any pre-release (a version with a dash) is a preview release if ($PSVersionTable.GitCommitId.Contains("-")) { $endpointName += "-preview"