mirror of
https://github.com/actions/runner-images.git
synced 2025-12-15 06:08:07 +00:00
26 lines
757 B
PowerShell
26 lines
757 B
PowerShell
Describe "Apache" {
|
|
Context "Path" {
|
|
It "Apache" {
|
|
$apachePath = Join-Path (Join-Path "C:\tools\" (Get-Item C:\tools\apache*).Name) "\bin\httpd"
|
|
"$apachePath -V" | Should -ReturnZeroExitCode
|
|
}
|
|
}
|
|
|
|
Context "Service" {
|
|
$apacheService = Get-Service -Name Apache
|
|
$apacheServiceTests = @{
|
|
Name = $apacheService.Name
|
|
Status = $apacheService.Status
|
|
StartType = $apacheService.StartType
|
|
}
|
|
|
|
It "<Name> service is stopped" -TestCases $apacheServiceTests {
|
|
$Status | Should -Be "Stopped"
|
|
}
|
|
|
|
It "<Name> service is disabled" -TestCases $apacheServiceTests {
|
|
$StartType | Should -Be "Disabled"
|
|
}
|
|
}
|
|
}
|