Files
runner-images/images/macos/tests/WebServers.Tests.ps1
Aleksandr Chebotov 4a8cc99a63 [macos] pester: Replace service status stopped to none (#4677)
* pester: Replace service status stopped to none

* validate stopped or none
2021-12-07 20:05:02 +03:00

22 lines
505 B
PowerShell

$os = Get-OSVersion
Describe "Apache" -Skip:($os.IsLessThanCatalina) {
It "Apache CLI" {
"httpd -v" | Should -ReturnZeroExitCode
}
It "Apache Service" {
brew services list | Out-String | Should -Match "httpd\s+(stopped|none)"
}
}
Describe "Nginx" -Skip:($os.IsLessThanCatalina) {
It "Nginx CLI" {
"nginx -v" | Should -ReturnZeroExitCode
}
It "Nginx Service" {
brew services list | Out-String | Should -Match "nginx\s+(stopped|none)"
}
}