[Windows] Add Apache and Nginx (#2517)

* [Windows] Add Apache and Nginx (#2501)

* Remove dot-sourcing in web-server tests

* Fix web servers readme generation
This commit is contained in:
Shivam Mathur
2021-02-01 06:03:49 -08:00
committed by GitHub
parent a49d4e2294
commit 349c66a268
8 changed files with 166 additions and 2 deletions

View File

@@ -0,0 +1,25 @@
Describe "Nginx" {
Context "Path" {
It "Nginx" {
$nginxPath = Join-Path (Join-Path "C:\tools\" (Get-Item C:\tools\nginx*).Name) "\nginx"
"$nginxPath -v" | Should -ReturnZeroExitCode
}
}
Context "Service" {
$nginxService = Get-Service -Name nginx
$nginxServiceTests = @{
Name = $nginxService.Name
Status = $nginxService.Status
StartType = $nginxService.StartType
}
It "<Name> service is stopped" -TestCases $nginxServiceTests {
$Status | Should -Be "Stopped"
}
It "<Name> service is disabled" -TestCases $nginxServiceTests {
$StartType | Should -Be "Disabled"
}
}
}