[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:
Vasilii Polikarpov
2023-12-11 22:23:36 +01:00
committed by GitHub
parent 76d6f0f574
commit 7fe65a2204
54 changed files with 544 additions and 418 deletions

View File

@@ -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
}
}