diff --git a/test/SmokeTests/e2e-test.ps1 b/test/SmokeTests/e2e-test.ps1 index cdb900150..845c35eb2 100644 --- a/test/SmokeTests/e2e-test.ps1 +++ b/test/SmokeTests/e2e-test.ps1 @@ -26,7 +26,7 @@ function Exit-OnError() { } $ErrorActionPreference = "Stop" -$AzuriteVersion = "3.32.0" +$AzuriteVersion = "3.26.0" if ($NoSetup -eq $false) { # Build the docker image first, since that's the most critical step @@ -35,15 +35,14 @@ if ($NoSetup -eq $false) { Exit-OnError # Next, download and start the Azurite emulator Docker image - Write-Host "Pulling down the mcr.microsoft.com/azure-storage/azurite image..." -ForegroundColor Yellow - docker pull "mcr.microsoft.com/azure-storage/azurite" + Write-Host "Pulling down the mcr.microsoft.com/azure-storage/azurite:$AzuriteVersion image..." -ForegroundColor Yellow + docker pull "mcr.microsoft.com/azure-storage/azurite:${AzuriteVersion}" Exit-OnError Write-Host "Starting Azurite storage emulator using default ports..." -ForegroundColor Yellow - docker run --name 'azurite' -p 10000:10000 -p 10001:10001 -p 10002:10002 -d "mcr.microsoft.com/azure-storage/azurite" + docker run --name 'azurite' -p 10000:10000 -p 10001:10001 -p 10002:10002 -d "mcr.microsoft.com/azure-storage/azurite:${AzuriteVersion}" Exit-OnError - # Author's note: we don't call 'Exit-OnError' here because this container may already be running - + if ($SetupSQLServer -eq $true) { Write-Host "Pulling down the mcr.microsoft.com/mssql/server:$tag image..." docker pull mcr.microsoft.com/mssql/server:$tag @@ -52,7 +51,7 @@ if ($NoSetup -eq $false) { # Start the SQL Server docker container with the specified edition Write-Host "Starting SQL Server $tag $sqlpid docker container on port $port" -ForegroundColor DarkYellow docker run --name mssql-server -e 'ACCEPT_EULA=Y' -e "MSSQL_SA_PASSWORD=$pw" -e "MSSQL_PID=$sqlpid" -p ${port}:1433 -d mcr.microsoft.com/mssql/server:$tag - # Author's note: we don't call 'Exit-OnError' here because this container may already be running + Exit-OnError # Wait for SQL Server to be ready Write-Host "Waiting for SQL Server to be ready..." -ForegroundColor Yellow @@ -66,7 +65,7 @@ if ($NoSetup -eq $false) { # Create the database with strict binary collation Write-Host "Creating '$dbname' database with '$collation' collation" -ForegroundColor DarkYellow - docker exec -d mssql-server /opt/mssql-tools18/bin/sqlcmd -S . -U sa -P "$pw" -Q "CREATE DATABASE [$dbname] COLLATE $collation" + docker exec -d mssql-server /opt/mssql-tools/bin/sqlcmd -S . -U sa -P "$pw" -Q "CREATE DATABASE [$dbname] COLLATE $collation" Exit-OnError # Wait for database to be ready @@ -81,7 +80,7 @@ if ($NoSetup -eq $false) { --env 'AzureWebJobsStorage=UseDevelopmentStorage=true;DevelopmentStorageProxyUri=http://host.docker.internal' ` --env 'WEBSITE_HOSTNAME=localhost:8080' ` $ImageName - # Author's note: we don't call 'Exit-OnError' here because this container may already be running + Exit-OnError } else { Write-Host "Starting $ContainerName application container" -ForegroundColor Yellow @@ -90,7 +89,7 @@ if ($NoSetup -eq $false) { --env 'WEBSITE_HOSTNAME=localhost:8080' ` $ImageName } - # Author's note: we don't call 'Exit-OnError' here because this container may already be running + Exit-OnError } if ($sleep -gt 0) { @@ -108,7 +107,6 @@ try { $pingUrl = "http://localhost:8080/admin/host/ping" Write-Host "Pinging app at $pingUrl to ensure the host is healthy" -ForegroundColor Yellow Invoke-RestMethod -Method Post -Uri "http://localhost:8080/admin/host/ping" - Write-Host "Host is healthy!" -ForegroundColor Green Exit-OnError if ($NoValidation -eq $false) { @@ -131,7 +129,6 @@ try { if ($result.runtimeStatus -eq "Completed") { $success = $true - Write-Host $result break }