diff --git a/test/powershell/Modules/Microsoft.PowerShell.Utility/WebCmdlets.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Utility/WebCmdlets.Tests.ps1 index 41d4af520..8d0856b8a 100644 --- a/test/powershell/Modules/Microsoft.PowerShell.Utility/WebCmdlets.Tests.ps1 +++ b/test/powershell/Modules/Microsoft.PowerShell.Utility/WebCmdlets.Tests.ps1 @@ -373,15 +373,9 @@ if ( test-path /etc/centos-release ) { $PendingCertificateTest = $true } Describe "Invoke-WebRequest tests" -Tags "Feature" { BeforeAll { - $response = Start-HttpListener -Port 8080 $WebListener = Start-WebListener } - AfterAll { - $null = Stop-HttpListener -Port 8080 - $response.PowerShell.Dispose() - } - # Validate the output of Invoke-WebRequest # function ValidateResponse { @@ -1419,15 +1413,9 @@ Describe "Invoke-WebRequest tests" -Tags "Feature" { Describe "Invoke-RestMethod tests" -Tags "Feature" { BeforeAll { - $response = Start-HttpListener -Port 8081 $WebListener = Start-WebListener } - AfterAll { - $null = Stop-HttpListener -Port 8081 - $response.PowerShell.Dispose() - } - #User-Agent changes on different platforms, so tests should only be run if on the correct platform It "Invoke-RestMethod returns Correct User-Agent on MacOSX" -Skip:(!$IsMacOS) { $uri = Get-WebListenerUrl -Test 'Get'