mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-19 08:21:44 +00:00
* ,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:
committed by
GitHub
parent
956b8a0093
commit
0c4dca229d
@@ -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"
|
||||
Reference in New Issue
Block a user