Replace current validates with pester testing approach #5 (#1232)

* ,oving to the pester approach part #5

* moving to the pester approach part #5

* fixed PostgreSQL tests

* return Validate-Svn.ps1

* fixed Selenium test

* fixed rust test

* fix rust test
This commit is contained in:
Aleksandr Chebotov
2020-07-20 18:57:00 +03:00
committed by GitHub
parent 956b8a0093
commit 0c4dca229d
18 changed files with 145 additions and 161 deletions

View File

@@ -19,7 +19,25 @@ $pgBin = Split-Path -Path $pgPath.split('"')[1]
$pgRoot = Split-Path -Path $pgPath.split('"')[5]
$pgData = Join-Path $pgRoot "data"
#Validate PostgreSQL installation
$pgReadyPath = Join-Path $pgBin "pg_isready.exe"
$pgReady = Start-Process -FilePath $pgReadyPath -Wait -PassThru
$exitCode = $pgReady.ExitCode
if ($exitCode -ne 0)
{
Write-Host -Object "PostgreSQL is not ready. Exitcode: $exitCode"
exit $exitCode
}
#Added PostgreSQL environment variable
Set-SystemVariable -SystemVariable PGBIN -Value $pgBin
Set-SystemVariable -SystemVariable PGROOT -Value $pgRoot
Set-SystemVariable -SystemVariable PGDATA -Value $pgData
#Stop and disable PostgreSQL service
$pgService = Get-Service -Name postgresql*
Stop-Service -InputObject $pgService
Set-Service -InputObject $pgService -StartupType Disabled
Invoke-PesterTests -TestFile "Databases" -TestName "PostgreSQL"