Files
runner-images/images/win/scripts/Tests/Apache.Tests.ps1
Shivam Mathur 349c66a268 [Windows] Add Apache and Nginx (#2517)
* [Windows] Add Apache and Nginx (#2501)

* Remove dot-sourcing in web-server tests

* Fix web servers readme generation
2021-02-01 17:03:49 +03:00

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"
}
}
}