Move PowerShell back to .NET Core 2.0.0-preview1-002106-00 (#4026)

This commit is contained in:
Dongbo Wang
2017-06-15 16:29:25 -07:00
committed by GitHub
parent 039ed6764d
commit b4973fc920
11 changed files with 33 additions and 41 deletions
@@ -24,7 +24,9 @@ Describe 'native commands with pipeline' -tags 'Feature' {
$rs.ResetRunspaceState()
}
It "native | native | native should work fine" {
# Make this test pending because of too many regressions in the latest .NET Core
# and thus we have to get back to an older .NET Core.
It "native | native | native should work fine" -Pending {
if ($IsWindows) {
$result = @(ping.exe | findstr.exe count | findstr.exe ping)
@@ -66,9 +66,7 @@ Describe "Get-ChildItem" -Tags "CI" {
$file.Count | Should be 1
$file.Name | Should be "pagefile.sys"
}
# Test is pending on Unix platforms because of a behavior change in the latest .NET Core.
# Tracked by https://github.com/dotnet/corefx/issues/20456
It "Should continue enumerating a directory when a contained item is deleted" -Pending:(!$IsWindows) {
It "Should continue enumerating a directory when a contained item is deleted" {
$Error.Clear()
[System.Management.Automation.Internal.InternalTestHooks]::SetTestHook("GciEnumerationActionDelete", $true)
$result = Get-ChildItem -Path $TestDrive -ErrorAction SilentlyContinue
@@ -86,9 +84,7 @@ Describe "Get-ChildItem" -Tags "CI" {
$result.Count | Should BeExactly 4
}
}
# Test is pending on Unix platforms because of a behavior change in the latest .NET Core.
# Tracked by https://github.com/dotnet/corefx/issues/20456
It "Should continue enumerating a directory when a contained item is renamed" -Pending:(!$IsWindows) {
It "Should continue enumerating a directory when a contained item is renamed" {
$Error.Clear()
[System.Management.Automation.Internal.InternalTestHooks]::SetTestHook("GciEnumerationActionRename", $true)
$result = Get-ChildItem -Path $TestDrive -ErrorAction SilentlyContinue
@@ -507,7 +507,9 @@ Describe "Invoke-WebRequest tests" -Tags "Feature" {
$jsonContent.headers.'User-Agent' | Should Match "WindowsPowerShell"
}
It "Validate Invoke-WebRequest -SkipCertificateCheck" {
## 'HttpClientHandler.ServerCertificateCustomValidationCallback' currently doesn't work in netcoreapp2.0 on Mac at all.
## This is tracked by powershell issue #3648.
It "Validate Invoke-WebRequest -SkipCertificateCheck" -Pending:$IsOSX {
# validate that exception is thrown for URI with expired certificate
$command = "Invoke-WebRequest -Uri 'https://expired.badssl.com'"
@@ -952,7 +954,9 @@ Describe "Invoke-RestMethod tests" -Tags "Feature" {
$jsonContent.headers.'User-Agent' | Should Match "WindowsPowerShell"
}
It "Validate Invoke-RestMethod -SkipCertificateCheck" {
## 'HttpClientHandler.ServerCertificateCustomValidationCallback' currently doesn't work in netcoreapp2.0 on Mac at all.
## This is tracked by powershell issue #3648.
It "Validate Invoke-RestMethod -SkipCertificateCheck" -Pending:$IsOSX {
# HTTP method HEAD must be used to not retrieve an unparsable HTTP body
# validate that exception is thrown for URI with expired certificate