mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Remove dotnet dependency to start WebListener (#8390)
WebListener.exe (which was already being built) is sufficient to start web listener. Remove the dependency on `dotnet` being present to start the web listener. Use `Start-Process` instead of `Start-Job` to launch the WebListener.
This commit is contained in:
committed by
Travis Plunk
parent
ac2b453ba7
commit
ee5fc080e2
@@ -257,19 +257,20 @@ Describe "Test-Connection" -tags "CI" {
|
||||
$result | Should -BeTrue
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Context "Connection" {
|
||||
BeforeAll {
|
||||
# Ensure the local host listen on port 80
|
||||
$WebListener = Start-WebListener
|
||||
}
|
||||
Describe "Connection" -Tag "CI", "RequireAdminOnWindows" {
|
||||
BeforeAll {
|
||||
# Ensure the local host listen on port 80
|
||||
$WebListener = Start-WebListener
|
||||
$UnreachableAddress = "10.11.12.13"
|
||||
}
|
||||
|
||||
It "Test connection to local host port 80" {
|
||||
Test-Connection '127.0.0.1' -TCPPort $WebListener.HttpPort | Should -BeTrue
|
||||
}
|
||||
It "Test connection to local host port 80" {
|
||||
Test-Connection '127.0.0.1' -TCPPort $WebListener.HttpPort | Should -BeTrue
|
||||
}
|
||||
|
||||
It "Test connection to unreachable host port 80" {
|
||||
Test-Connection $UnreachableAddress -TCPPort 80 -TimeOut 1 | Should -BeFalse
|
||||
}
|
||||
It "Test connection to unreachable host port 80" {
|
||||
Test-Connection $UnreachableAddress -TCPPort 80 -TimeOut 1 | Should -BeFalse
|
||||
}
|
||||
}
|
||||
|
||||
@@ -367,7 +367,7 @@ $redirectTests = @(
|
||||
@{redirectType = 'relative'; redirectedMethod = 'GET'}
|
||||
)
|
||||
|
||||
Describe "Invoke-WebRequest tests" -Tags "Feature" {
|
||||
Describe "Invoke-WebRequest tests" -Tags "Feature", "RequireAdminOnWindows" {
|
||||
BeforeAll {
|
||||
$WebListener = Start-WebListener
|
||||
}
|
||||
@@ -1785,7 +1785,7 @@ Describe "Invoke-WebRequest tests" -Tags "Feature" {
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Invoke-RestMethod tests" -Tags "Feature" {
|
||||
Describe "Invoke-RestMethod tests" -Tags "Feature", "RequireAdminOnWindows" {
|
||||
BeforeAll {
|
||||
$WebListener = Start-WebListener
|
||||
}
|
||||
@@ -3069,7 +3069,7 @@ Describe "Invoke-RestMethod tests" -Tags "Feature" {
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Validate Invoke-WebRequest and Invoke-RestMethod -InFile" -Tags "Feature" {
|
||||
Describe "Validate Invoke-WebRequest and Invoke-RestMethod -InFile" -Tags "Feature", "RequireAdminOnWindows" {
|
||||
BeforeAll {
|
||||
$WebListener = Start-WebListener
|
||||
}
|
||||
@@ -3149,7 +3149,7 @@ Describe "Validate Invoke-WebRequest and Invoke-RestMethod -InFile" -Tags "Featu
|
||||
}
|
||||
}
|
||||
|
||||
Describe "Web cmdlets tests using the cmdlet's aliases" -Tags "CI" {
|
||||
Describe "Web cmdlets tests using the cmdlet's aliases" -Tags "CI", "RequireAdminOnWindows" {
|
||||
BeforeAll {
|
||||
$WebListener = Start-WebListener
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user