mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-31 06:00:09 +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
@@ -5,15 +5,15 @@ Describe "MongoDB" {
|
||||
@{ ToolName = "mongod" }
|
||||
) {
|
||||
$toolsetVersion = (Get-ToolsetContent).mongodb.version
|
||||
(&$ToolName --version)[2].Split('"')[-2] | Should -BeLike "$toolsetVersion*"
|
||||
(& $ToolName --version)[2].Split('"')[-2] | Should -BeLike "$toolsetVersion*"
|
||||
}
|
||||
}
|
||||
|
||||
Context "Service" {
|
||||
$mongoService = Get-Service -Name mongodb -ErrorAction Ignore
|
||||
$mongoServiceTests = @{
|
||||
Name = $mongoService.Name
|
||||
Status = $mongoService.Status
|
||||
Name = $mongoService.Name
|
||||
Status = $mongoService.Status
|
||||
StartType = $mongoService.StartType
|
||||
}
|
||||
|
||||
@@ -29,9 +29,9 @@ Describe "MongoDB" {
|
||||
|
||||
Describe "PostgreSQL" {
|
||||
$psqlTests = @(
|
||||
@{envVar = "PGROOT"; pgPath = Get-EnvironmentVariable "PGROOT"}
|
||||
@{envVar = "PGBIN"; pgPath = Get-EnvironmentVariable "PGBIN"}
|
||||
@{envVar = "PGDATA"; pgPath = Get-EnvironmentVariable "PGDATA"}
|
||||
@{envVar = "PGROOT"; pgPath = Get-EnvironmentVariable "PGROOT" }
|
||||
@{envVar = "PGBIN"; pgPath = Get-EnvironmentVariable "PGBIN" }
|
||||
@{envVar = "PGDATA"; pgPath = Get-EnvironmentVariable "PGDATA" }
|
||||
)
|
||||
|
||||
Context "Environment variable" {
|
||||
@@ -57,8 +57,8 @@ Describe "PostgreSQL" {
|
||||
Context "Service" {
|
||||
$psqlService = Get-Service -Name postgresql*
|
||||
$psqlServiceTests = @{
|
||||
Name = $psqlService.Name
|
||||
Status = $psqlService.Status
|
||||
Name = $psqlService.Name
|
||||
Status = $psqlService.Status
|
||||
StartType = $psqlService.StartType
|
||||
}
|
||||
|
||||
@@ -75,9 +75,9 @@ Describe "PostgreSQL" {
|
||||
It "PostgreSQL version should correspond to the version in the toolset" {
|
||||
$toolsetVersion = (Get-ToolsetContent).postgresql.version
|
||||
# Client version
|
||||
(&$Env:PGBIN\psql --version).split()[-1] | Should -BeLike "$toolsetVersion*"
|
||||
(& $env:PGBIN\psql --version).split()[-1] | Should -BeLike "$toolsetVersion*"
|
||||
# Server version
|
||||
(&$Env:PGBIN\pg_config --version).split()[-1] | Should -BeLike "$toolsetVersion*"
|
||||
(& $env:PGBIN\pg_config --version).split()[-1] | Should -BeLike "$toolsetVersion*"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user