dotnet / SqlClient

Microsoft.Data.SqlClient provides database connectivity to SQL Server for .NET applications.
MIT License
842 stars 281 forks source link

CertificateTests are broken #2805

Open David-Engel opened 1 month ago

David-Engel commented 1 month ago

OpeningConnectionWitHNICTest and OpenningConnectionWithGoodCertificateTest are both broken and fail if the TCPConnectionString doesn't include TrustServerCertificate=true. The tests are supposed to install a self-signed certificate to the localhost SQL Server instance and add it to the root cert store so that it is trusted by the system. But it doesn't work and needs to be fixed.

RemoteCertificateNameMismatchErrorTest was already flagged as an active issue (26934), but I can't find that issue number anywhere, so updating that number to include in the new issue I filed internally.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 71.59%. Comparing base (619fa74) to head (285f7e3). Report is 7 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2805 +/- ## ========================================== - Coverage 71.66% 71.59% -0.07% ========================================== Files 308 308 Lines 62297 62297 ========================================== - Hits 44646 44604 -42 - Misses 17651 17693 +42 ``` | [Flag](https://app.codecov.io/gh/dotnet/SqlClient/pull/2805/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | Coverage Δ | | |---|---|---| | [addons](https://app.codecov.io/gh/dotnet/SqlClient/pull/2805/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | `92.90% <ø> (ø)` | | | [netcore](https://app.codecov.io/gh/dotnet/SqlClient/pull/2805/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | `75.83% <ø> (-0.09%)` | :arrow_down: | | [netfx](https://app.codecov.io/gh/dotnet/SqlClient/pull/2805/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | `69.64% <ø> (-0.02%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.