Move Test Config to Jsonc#4297
Open
benrr101 wants to merge 15 commits into
Open
Conversation
benrr101
commented
May 20, 2026
| public string DNSCachingConnString = null; | ||
| public string DNSCachingServerCR = null; // this is for the control ring | ||
| public string DNSCachingServerTR = null; // this is for the tenant ring | ||
| public bool IsAzureSynapse = false; // True for Azure Data Warehouse/Synapse |
Contributor
Author
There was a problem hiding this comment.
This was removed as it is not used.
| public string AliasName = null; | ||
|
|
||
| public static Config Load(string configPath = @"config.json") | ||
| public static Config Load(string configPath) |
Contributor
Author
There was a problem hiding this comment.
This was added as an escape hatch for preserving the behavior of ExtUtilities project. I have plans to remove the ExtUtilities project, so this method will hopefully go away someday.
| "WorkloadIdentityFederationServiceConnectionId": "", | ||
| "KerberosDomainPassword": "", | ||
| "KerberosDomainuser": "", | ||
| "IsManagedInstance": false |
Contributor
Author
There was a problem hiding this comment.
These fields exist in Config class, but did not in the json file.
| "SupportsIntegratedSecurity": true, | ||
| "LocalDbAppName": "", | ||
| "LocalDbSharedInstanceName": "", | ||
| "SupportsFileStream": false, |
Contributor
Author
There was a problem hiding this comment.
This field did not exist in the Config class.
| "DNSCachingServerTR": "", | ||
| "IsDNSCachingSupportedCR": false, | ||
| "IsDNSCachingSupportedTR": false, | ||
| "IsAzureSynapse": false, |
Contributor
Author
There was a problem hiding this comment.
This field existed in the Config class, but was removed since it's unused.
edwardneal
reviewed
May 20, 2026
5885bb9 to
57e9b41
Compare
paulmedynski
previously approved these changes
Jun 2, 2026
mdaigle
previously approved these changes
Jun 3, 2026
| <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> | ||
| </None> | ||
| <PackageReference Include="Newtonsoft.Json" /> | ||
| <None Update="config.jsonc" CopyToOutputDirectory="PreserveNewest" /> |
| # All properties should be added here, and this template should be used for any manipulation of the config.jsonc file. | ||
| - pwsh: | | ||
| $jdata = Get-Content -Raw "config.default.json" | ConvertFrom-Json | ||
| $jdata = Get-Content -Raw "config.default.jsonc" | ConvertFrom-Json |
| configSqlFor: local | ||
| operatingSystem: Windows | ||
| # config.json properties | ||
| # config.jsonc properties |
| - pwsh: | | ||
| $managedSni = [System.Convert]::ToBoolean($env:MANAGED_SNI) | ||
| $jdata = Get-Content -Raw "config.default.json" | ConvertFrom-Json | ||
| $jdata = Get-Content -Raw "config.default.jsonc" | ConvertFrom-Json |
| # --- Update test configuration (with Kerberos credentials) --- | ||
| - pwsh: | | ||
| $jdata = Get-Content -Raw "config.default.json" | ConvertFrom-Json | ||
| $jdata = Get-Content -Raw "config.default.jsonc" | ConvertFrom-Json |
Comment on lines
197
to
199
| Edit the source configuration file at `src/Microsoft.Data.SqlClient/tests/tools/Microsoft.Data.SqlClient.TestUtilities/ | ||
| config.json`. The test utilities project copies that file to the test output directory, where the manual tests load it | ||
| config.jsonc`. The test utilities project copies that file to the test output directory, where the manual tests load it | ||
| by default. |
|
|
||
| ```bash | ||
| MDS_TEST_CONFIG=/path/to/config.json dotnet build -t:TestSqlClientManual -p:TestSet=2 | ||
| TEST_MDS_CONFIG=/path/to/config.jsonc dotnet build -t:TestSqlClientManual -p:TestSet=2 |
| ```powershell | ||
| $env:MDS_TEST_CONFIG = "C:\path\to\config.json" | ||
| $env:TEST_MDS_CONFIG = "C:\path\to\config.jsonc" | ||
| dotnet build -t:TestSqlClientManual -p:TestSet=2 |
paulmedynski
approved these changes
Jun 4, 2026
Contributor
paulmedynski
left a comment
There was a problem hiding this comment.
Looks good, modulo Copilot feedback.
mdaigle
approved these changes
Jun 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
As a byproduct of the PR pipeline, I got annoyed with the red squigglies under the comments in the test config.json file. Technically speaking jsonc files support comments while json does not. So, this small PR does the following:
#nullable🤖
Used 🤖 to find remaining references to config.json and replace with references to config.jsonc
Issues
N/A
Testing
Everything builds, but I want to validate with a PR run before taking it out of draft state.