New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix | Fix Unit Tests for GetSqlServerSPN #2442
base: main
Are you sure you want to change the base?
Conversation
Added unit test to test GetSqlServerSPNs function to return port number for TCP and instance name for NP.
src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SNI/SNIProxy.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/InstanceNameTest/InstanceNameTest.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/InstanceNameTest/InstanceNameTest.cs
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SNI/SNIProxy.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SNI/SNIProxy.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SNI/SNIProxy.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/InstanceNameTest/InstanceNameTest.cs
Show resolved
Hide resolved
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2442 +/- ##
==========================================
+ Coverage 66.85% 72.68% +5.82%
==========================================
Files 304 313 +9
Lines 61576 61727 +151
==========================================
+ Hits 41168 44865 +3697
+ Misses 20408 16862 -3546
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
…ion of InstanceName property. Add IntanceName initialization using reflection instead in the unit test instead.
This PR is for the addition of Unit Tests of the GetSqlServerSPNs function of SNIProxy class.
The unit tests is to ensure that the GetSqlServerSPNs function returns a port number for TCP protocol and returns an instance name for NP protocol.
In addition, unit tests were added to test the DataTestUtility.ParseDataSource function.