Files
runner-images/images/macos/scripts/tests/WebServers.Tests.ps1
Erik Bershel ab15087979 [macOS] Introduce macOS-15 code (#10535)
Co-authored-by: Alexey-Ayupov <alexey-ayupov@github.com>
2024-09-03 18:45:06 +02:00

26 lines
777 B
PowerShell

Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
$os = Get-OSVersion
Describe "Apache" -Skip:($os.IsVentura -or $os.IsSonoma -or $os.IsSequoia) {
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)"
}
}
Describe "Nginx" -Skip:($os.IsVentura -or $os.IsSonoma -or $os.IsSequoia) {
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)"
}
}