Skip to content

Commit

Permalink
detail why mssql test fails
Browse files Browse the repository at this point in the history
  • Loading branch information
gukoff committed Aug 9, 2024
1 parent 12035d4 commit cd259ab
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion test/SmokeTests/e2e-test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ $AzuriteVersion = "3.26.0"
if ($NoSetup -eq $false) {
# Build the docker image first, since that's the most critical step
Write-Host "Building sample app Docker container from '$DockerfilePath'..." -ForegroundColor Yellow
docker build --pull --no-cache -f $DockerfilePath -t $ImageName --progress plain $PSScriptRoot/../../
docker build -f $DockerfilePath -t $ImageName --progress plain $PSScriptRoot/../../
Exit-OnError

# Next, download and start the Azurite emulator Docker image
Expand All @@ -58,6 +58,16 @@ if ($NoSetup -eq $false) {
Start-Sleep -Seconds 30 # Adjust the sleep duration based on your SQL Server container startup time
Exit-OnError

Write-Host "Checking if SQL Server is still running..." -ForegroundColor Yellow
$sqlServerStatus = docker inspect -f '{{.State.Status}}' mssql-server
Exit-OnError

if ($sqlServerStatus -ne "running") {
Write-Host "Unexpected SQL Server status: $sqlServerStatus" -ForegroundColor Yellow
docker logs mssql-server
exit 1;
}

# Get SQL Server IP Address - used to create SQLDB_Connection
Write-Host "Getting IP Address..." -ForegroundColor Yellow
$serverIpAddress = docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' mssql-server
Expand Down

0 comments on commit cd259ab

Please sign in to comment.