mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-20 06:29:50 +00:00
[Windows] Add Apache and Nginx (#2517)
* [Windows] Add Apache and Nginx (#2501) * Remove dot-sourcing in web-server tests * Fix web servers readme generation
This commit is contained in:
25
images/win/scripts/Tests/Apache.Tests.ps1
Normal file
25
images/win/scripts/Tests/Apache.Tests.ps1
Normal file
@@ -0,0 +1,25 @@
|
||||
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"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user