File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 6060 env :
6161 FORCE_ENCRYPTION : ${{ matrix.force-encryption }}
6262 SA_PASSWORD : " bHuZH81%cGC6"
63+ VERSION : ${{ matrix.version }}
Original file line number Diff line number Diff line change 99Write-Output " Checking if SQL Server is available ..."
1010& sqlcmd - S 127.0 .0.1 - U sa - P $env: SA_PASSWORD - Q " SELECT 1"
1111
12+ Write-Output " Check if requested version was installed ..."
13+ $sqlcmdOutput = & sqlcmd - S 127.0 .0.1 - U sa - P $env: SA_PASSWORD - Q " SELECT @@VERSION" - h -1
14+ $result = $sqlcmdOutput | Select-String - Pattern " Microsoft SQL Server (\d+)"
15+
16+ if ($result.Matches.Groups [1 ].Value -Eq $env: VERSION ) {
17+ Write-Output " Installled version matches expected version $env: VERSION "
18+ }
19+ else {
20+ Write-Error " Installed version does not match expected version $env: VERSION "
21+ Write-Error " sqlcmd output: $sqlcmdOutput "
22+ exit 1
23+ }
24+
1225Write-Output " Check status of connection encryption ..."
1326
1427$sqlQuery = @"
You can’t perform that action at this time.
0 commit comments