Skip to content

Commit

Permalink
Stop HttpListener from running in WebCmdlet tests (PowerShell#5921)
Browse files Browse the repository at this point in the history
  • Loading branch information
markekraus authored and daxian-dbw committed Jan 18, 2018
1 parent bb8d556 commit febc1e8
Showing 1 changed file with 0 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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'
Expand Down

0 comments on commit febc1e8

Please sign in to comment.