mirror of
https://github.com/actions/runner-images.git
synced 2025-12-28 20:58:32 +08:00
[Windows] Apply code style rules to Windows scripts (#8957)
* Apply code style rules to Windows scripts * Fix typo * Fix configure-toolset script * Fix parameters in Msys2 installation script * Improve log readability * Remove broken exit code validation
This commit is contained in:
committed by
GitHub
parent
76d6f0f574
commit
7fe65a2204
@@ -17,7 +17,7 @@ Describe "WindowsFeatures" {
|
||||
|
||||
Describe "DiskSpace" {
|
||||
It "The image has enough disk space"{
|
||||
$availableSpaceMB = [math]::Round((Get-PSDrive -Name C).Free / 1MB)
|
||||
$availableSpaceMB = [math]::Round((Get-PSDrive -Name C).Free / 1MB)
|
||||
$minimumFreeSpaceMB = 18 * 1024
|
||||
|
||||
$availableSpaceMB | Should -BeGreaterThan $minimumFreeSpaceMB
|
||||
@@ -26,7 +26,7 @@ Describe "DiskSpace" {
|
||||
|
||||
Describe "DynamicPorts" {
|
||||
It "Test TCP dynamicport start=49152 num=16384" {
|
||||
$tcpPorts = Get-NetTCPSetting | Where-Object {$_.SettingName -ne "Automatic"} | Where-Object {
|
||||
$tcpPorts = Get-NetTCPSetting | Where-Object { $_.SettingName -ne "Automatic" } | Where-Object {
|
||||
$_.DynamicPortRangeStartPort -ne 49152 -or $_.DynamicPortRangeNumberOfPorts -ne 16384
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ Describe "GDIProcessHandleQuota" {
|
||||
}
|
||||
|
||||
Describe "Test Signed Drivers" {
|
||||
It "bcdedit testsigning should be Yes"{
|
||||
It "bcdedit testsigning should be Yes" {
|
||||
"$(bcdedit)" | Should -Match "testsigning\s+Yes"
|
||||
}
|
||||
}
|
||||
@@ -64,7 +64,7 @@ Describe "Windows Updates" {
|
||||
|
||||
$testCases = Get-WindowsUpdateStates | Sort-Object Title | ForEach-Object {
|
||||
@{
|
||||
Title = $_.Title
|
||||
Title = $_.Title
|
||||
State = $_.State
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user