Move CLI tests to the separate test file on Windows (#1363)

* move cli tests to the separate file

* switch install scripts

* unify CLI names
This commit is contained in:
Maxim Lobanov
2020-08-06 11:27:58 +03:00
committed by GitHub
parent 490f615019
commit 0f6fba462a
16 changed files with 81 additions and 206 deletions
@@ -6,16 +6,17 @@ function Get-PostgreSQLMarkdown
$pgRoot = $pgPath.split('"')[1].replace("\bin\pg_ctl.exe", "")
$env:Path += ";${env:PGBIN}"
$pgVersion = (postgres --version).split()[2].Trim()
$content = [PSCustomObject]@{
Version = $pgVersion
UserName = $env:PGUSER
Password = $env:PGPASSWORD
EnvironmentVariables = "PGBIN=$env:PGBIN; <br> PGDATA=$env:PGDATA; <br> PGROOT=$env:PGROOT"
Path = $pgRoot
ServiceName = $pgService.Name
ServiceStatus = $pgService.State
ServiceStartType = $pgService.StartMode
} | New-MDTable
$content = @(
[PSCustomObject]@{ Property = "ServiceName"; Value = $pgService.Name },
[PSCustomObject]@{ Property = "Version"; Value = $pgVersion },
[PSCustomObject]@{ Property = "ServiceStatus"; Value = $pgService.State },
[PSCustomObject]@{ Property = "ServiceStartType"; Value = $pgService.StartMode },
[PSCustomObject]@{ Property = "EnvironmentVariables"; Value = "`PGBIN=$env:PGBIN` <br> `PGDATA=$env:PGDATA` <br> `PGROOT=$env:PGROOT` " },
[PSCustomObject]@{ Property = "Path"; Value = $pgRoot },
[PSCustomObject]@{ Property = "UserName"; Value = $env:PGUSER },
[PSCustomObject]@{ Property = "Password"; Value = $env:PGPASSWORD }
) | New-MDTable
Build-MarkdownElement -Head $name -Content $content
}