Files
runner-images/images/macos/scripts/tests/WebServers.Tests.ps1
T

26 lines
741 B
PowerShell
Raw Normal View History

Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
2021-01-27 17:26:40 +03:00
$os = Get-OSVersion
Describe "Apache" -Skip:($os.IsVentura -or $os.IsSonoma) {
2021-01-26 17:14:31 +03:00
It "Apache CLI" {
"httpd -v" | Should -ReturnZeroExitCode
}
It "Apache Service" {
$service = brew services list --json | ConvertFrom-Json | Where-Object { $_.name -eq "httpd" }
$service.status | Should -Match "(stopped|none)"
2021-01-26 17:14:31 +03:00
}
}
Describe "Nginx" -Skip:($os.IsVentura -or $os.IsSonoma) {
2021-01-26 17:14:31 +03:00
It "Nginx CLI" {
"nginx -v" | Should -ReturnZeroExitCode
}
It "Nginx Service" {
$service = brew services list --json | ConvertFrom-Json | Where-Object { $_.name -eq "nginx" }
$service.status | Should -Match "(stopped|none)"
2021-01-26 17:14:31 +03:00
}
}