mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-20 06:29:50 +00:00
[Windows] Implement new directories hierarchy (#8616)
This commit is contained in:
committed by
GitHub
parent
84a7deae24
commit
d1f2c9a3be
25
images/windows/scripts/tests/Nginx.Tests.ps1
Normal file
25
images/windows/scripts/tests/Nginx.Tests.ps1
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user