WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 0250ff2

Browse files
committed
specifying nuget config file
1 parent e2e1726 commit 0250ff2

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

azure-pipelines/integration-tests.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,39 @@ steps:
3232
exit 1
3333
}
3434
} while ($true)
35+
36+
# Verify connection and print version
37+
docker exec sql2025 /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P "$password" -Q "SELECT @@VERSION"
38+
39+
# Create settings.json for tests
40+
$settingsContent = @"
41+
{
42+
"mssql.connections": [
43+
{
44+
"server": "localhost",
45+
"authenticationType": "SqlLogin",
46+
"user": "sa",
47+
"password": "$password",
48+
"serverType": "OnPrem"
49+
}
50+
]
51+
}
52+
"@
53+
$settingsPath = Join-Path "$(Agent.TempDirectory)" "settings.json"
54+
Set-Content -Path $settingsPath -Value $settingsContent
55+
Write-Host "Created settings.json at $settingsPath"
56+
57+
# Set environment variable for tests
58+
Write-Host "##vso[task.setvariable variable=SettingsFileName]$settingsPath"
3559
displayName: 'Setup Docker image for integration tests'
3660

3761
- task: DotNetCoreCLI@2
3862
displayName: 'dotnet restore test/Microsoft.SqlTools.ServiceLayer.IntegrationTests'
3963
inputs:
4064
command: restore
4165
projects: test/Microsoft.SqlTools.ServiceLayer.IntegrationTests
66+
feedsToUse: 'config'
67+
nugetConfigPath: 'nuget.config'
4268

4369
- task: DotNetCoreCLI@2
4470
displayName: 'dotnet test test/Microsoft.SqlTools.ServiceLayer.IntegrationTests'

0 commit comments

Comments
 (0)