Skip to content

Conversation

@paulmedynski
Copy link
Contributor

Description

This PR moves all existing MDS tests that use the ActiveDirectoryAuthenticationProvider (ADAP) into the Azure project. The tests are moved as-is with non-functional changes to get them to build/run.

A few MDS tests were unnecessarily using ADAP when they should have been using a test provider, so I updated them to do so.

A full suite of tests for the Azure package will be created in future PRs.

Testing

Existing CI for the Azure and MDS packages should confirm everything.

@paulmedynski paulmedynski added this to the 7.0.0-preview3 milestone Oct 24, 2025
Copy link
Contributor Author

@paulmedynski paulmedynski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commentary for reviewers.

@paulmedynski paulmedynski force-pushed the dev/paul/azure-split/move-tests branch from 1903ecc to b17155b Compare October 28, 2025 16:27
@codecov
Copy link

codecov bot commented Oct 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (feat/azure-split@540c2c6). Learn more about missing BASE report.

Additional details and impacted files
@@                 Coverage Diff                 @@
##             feat/azure-split    #3717   +/-   ##
===================================================
  Coverage                    ?   76.45%           
===================================================
  Files                       ?      271           
  Lines                       ?    43029           
  Branches                    ?        0           
===================================================
  Hits                        ?    32896           
  Misses                      ?    10133           
  Partials                    ?        0           
Flag Coverage Δ
addons 90.82% <ø> (?)
netcore 76.45% <ø> (?)
netfx 75.96% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor Author

@paulmedynski paulmedynski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commentary for reviewers.

@paulmedynski paulmedynski force-pushed the dev/paul/azure-split/move-tests branch from 5d4f942 to 1e27ff4 Compare November 7, 2025 19:28
@paulmedynski paulmedynski changed the title Move ActiveDirectoryAuthenticationProvider Tests [DRAFT] Move ActiveDirectoryAuthenticationProvider Tests Nov 7, 2025
Base automatically changed from dev/paul/azure-split/authentication to feat/azure-split November 14, 2025 20:08
@paulmedynski paulmedynski force-pushed the dev/paul/azure-split/move-tests branch from 1e27ff4 to 21ab32e Compare November 17, 2025 12:34
Abstractions Package - Pipeline Changes (#3628)
Move AAD/Entra Authentication into new Azure package (#3680)
User Story 39839: Move existing MDS tests to Azure package

- Identified and moved tests specific to ActiveDirectoryAuthenticationProvider into the Azure Test project.
- Updated some MDS tests that unnecessarily used ActiveDirectoryAuthenticationProvider.
- Added tests to Abstractions Test project to ensure AAD/Entra auth fails when the Azure package isn't present.
- Various build and pipeline changes to support the test changes.
- Fixed project-based builds so we can restore MDS netcore and netfx projects at the same time.
- Added caching to the managed identity provider for the ManualTest project.
- Moved username/password Entra auth provider into its own file for sharing across tests.
- Added ADO service connection for test tasks that require access to Azure resources.
- Added workload identity federation tests.
- Solved the mystery of SNI DLLs missing for .NET Framework project-reference-based builds.
- Added ADO-CI-1ES pool jobs to test the Azure package on Linux and Windows.
- Fixed Azure package pipelines to support pools in the ADO.Net and Public projects.
- Added some new pipeline variables to handle the Workload Identity Federation test.
@paulmedynski paulmedynski force-pushed the dev/paul/azure-split/move-tests branch from 21ab32e to 6f7f621 Compare November 17, 2025 17:31
Copy link
Contributor Author

@paulmedynski paulmedynski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commentary and things for myself to fix.

@paulmedynski paulmedynski changed the title [DRAFT] Move ActiveDirectoryAuthenticationProvider Tests Move ActiveDirectoryAuthenticationProvider Tests Dec 2, 2025
@paulmedynski paulmedynski marked this pull request as ready for review December 2, 2025 11:34
@paulmedynski paulmedynski requested a review from a team as a code owner December 2, 2025 11:34
Copilot AI review requested due to automatic review settings December 2, 2025 11:34
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates ActiveDirectoryAuthenticationProvider (ADAP) tests from the Microsoft.Data.SqlClient (MDS) test suite to the Azure package. The migration includes infrastructure changes to support project-reference builds with different assembly names for .NET Core and .NET Framework, along with new test utilities and comprehensive pipeline updates.

Key Changes:

  • Build infrastructure updated to handle assembly name suffixes for project-reference builds
  • ActiveDirectoryAuthenticationProvider tests moved from MDS ManualTests to Azure package tests
  • New test provider implementations (UsernamePasswordProvider, ManagedIdentityProvider) added to MDS tests
  • Azure package tests now have comprehensive configuration and pipeline support

Reviewed changes

Copilot reviewed 55 out of 56 changed files in this pull request and generated 16 comments.

Show a summary per file
File Description
tools/targets/GenerateMdsPackage.targets Added assembly name suffix properties for project builds
tools/targets/CopySniDllsForNetFxProjectReferenceBuilds.targets New target file to copy SNI DLLs for .NET Framework project builds
tools/specs/Microsoft.Data.SqlClient.nuspec Updated to support optional assembly name suffixes in file paths
src/Microsoft.SqlServer.Server/StringsHelper.cs Added braces for single-line if statements (code style fix)
src/Microsoft.Data.SqlClient/tests/ManualTests/SQL/ConnectivityTests/AADConnectionTest.cs Removed ADAP-dependent tests, added test provider usage for remaining tests
src/Microsoft.Data.SqlClient/tests/ManualTests/DataCommon/UsernamePasswordProvider.cs New test provider for username/password authentication
src/Microsoft.Data.SqlClient/tests/ManualTests/DataCommon/ManagedIdentityProvider.cs New test provider for managed identity authentication
src/Microsoft.Data.SqlClient/tests/FunctionalTests/AADAuthenticationTests.cs Removed ADAP constructor tests (moved to Azure package)
src/Microsoft.Data.SqlClient/tests/FunctionalTests/SqlAuthenticationProviderTest.cs Deleted - tests moved to Azure package
src/Microsoft.Data.SqlClient.Extensions/Azure/test/AADConnectionTest.cs New file with migrated ADAP connection tests
src/Microsoft.Data.SqlClient.Extensions/Azure/test/AADAuthenticationTests.cs New file with migrated ADAP provider constructor tests
src/Microsoft.Data.SqlClient.Extensions/Azure/test/DefaultAuthProviderTests.cs New test verifying ADAP is installed for all AAD methods
src/Microsoft.Data.SqlClient.Extensions/Azure/test/Config.cs New configuration class for Azure package tests
src/Microsoft.Data.SqlClient.Extensions/Abstractions/src/SqlAuthenticationProviderInternal.cs Enhanced to support assembly name suffixes and improved logging
src/Directory.Build.props Added ApplyMdsAssemblyNameSuffix property logic
eng/pipelines/* Multiple pipeline files updated for consistent parameter naming and new test infrastructure

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

Copilot AI review requested due to automatic review settings January 6, 2026 14:55
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 54 out of 55 changed files in this pull request and generated 10 comments.

- Removed unnecessary package ref to Microsoft.Win32.Registry.
Copilot AI review requested due to automatic review settings January 6, 2026 18:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 53 out of 54 changed files in this pull request and generated 3 comments.

…ffs.

- Added .NET 10 Runtime to the Abstractions and Azure package tests.
- Added the feat/* branches to CodeQL config.
- Found a few leftover relative paths for templates and made them absolute.
Copilot AI review requested due to automatic review settings January 7, 2026 13:37
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 59 out of 60 changed files in this pull request and generated 1 comment.

Copy link
Contributor

@mdaigle mdaigle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one request remaining regarding the missing test.

@cheenamalhotra cheenamalhotra added the Area\Tests Issues that are targeted to tests or test projects label Jan 13, 2026
Copy link
Contributor

@benrr101 benrr101 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm looking at this as mostly a work-still-in-progress set of changes. Some of it overlaps with changes I have inflight for common mds project, some of it I hope we can tweak later on. But since this is just to the feature branch, I'll trust as long as it's working, it'll keep you moving.

@paulmedynski
Copy link
Contributor Author

@benrr101 - I've applied your suggestions to the next PR #3873.

@paulmedynski paulmedynski merged commit beba4a4 into feat/azure-split Jan 15, 2026
296 of 408 checks passed
@paulmedynski paulmedynski deleted the dev/paul/azure-split/move-tests branch January 15, 2026 12:53
paulmedynski added a commit that referenced this pull request Jan 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area\Tests Issues that are targeted to tests or test projects

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants