mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-17 23:36:44 +00:00
* [Windows] Add Apache and Nginx (#2501) * Remove dot-sourcing in web-server tests * Fix web servers readme generation
26 lines
740 B
PowerShell
26 lines
740 B
PowerShell
Describe "Nginx" {
|
|
Context "Path" {
|
|
It "Nginx" {
|
|
$nginxPath = Join-Path (Join-Path "C:\tools\" (Get-Item C:\tools\nginx*).Name) "\nginx"
|
|
"$nginxPath -v" | Should -ReturnZeroExitCode
|
|
}
|
|
}
|
|
|
|
Context "Service" {
|
|
$nginxService = Get-Service -Name nginx
|
|
$nginxServiceTests = @{
|
|
Name = $nginxService.Name
|
|
Status = $nginxService.Status
|
|
StartType = $nginxService.StartType
|
|
}
|
|
|
|
It "<Name> service is stopped" -TestCases $nginxServiceTests {
|
|
$Status | Should -Be "Stopped"
|
|
}
|
|
|
|
It "<Name> service is disabled" -TestCases $nginxServiceTests {
|
|
$StartType | Should -Be "Disabled"
|
|
}
|
|
}
|
|
}
|