Skip to content

Commit eb3c5c1

Browse files
committed
add a test step
1 parent 3748241 commit eb3c5c1

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

azure-pipelines.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,25 @@ jobs:
325325
fi
326326
displayName: Install ODBC Driver
327327
328+
- script: |
329+
# Install mssql-tools to get sqlcmd
330+
sudo ACCEPT_EULA=Y apt-get install -y mssql-tools
331+
332+
# Test SQL Server authentication
333+
echo "Testing SQL Server authentication with SA user..."
334+
export PATH="$PATH:/opt/mssql-tools/bin"
335+
336+
# Try to connect and run a simple query
337+
if sqlcmd -S localhost -U sa -P "$(TestAppPassword)" -Q "SELECT 1 AS test" -t 30; then
338+
echo "✅ SQL Server authentication successful!"
339+
else
340+
echo "❌ SQL Server authentication FAILED!"
341+
echo "Container logs:"
342+
docker logs $(docker ps -q --filter ancestor=mcr.microsoft.com/mssql/server:2022-latest)
343+
exit 1
344+
fi
345+
displayName: Test SQL Server Authentication
346+
328347
- script: |
329348
# Since pylibmc isn't supported for Python 3.12+
330349
# We need to install libmemcached-dev to build it - dependency for Django test suite

0 commit comments

Comments
 (0)