2023-05-05 12:13:47 +02:00
|
|
|
Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
|
|
|
|
|
|
2021-01-27 17:26:40 +03:00
|
|
|
$os = Get-OSVersion
|
|
|
|
|
|
2024-01-18 10:41:59 +01:00
|
|
|
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" {
|
2024-03-05 00:10:31 +01:00
|
|
|
$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
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-11-10 18:53:24 +01: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" {
|
2024-03-05 00:10:31 +01:00
|
|
|
$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
|
|
|
}
|
|
|
|
|
}
|