[MAINTENANCE] Human-readable MSSQL test connection exceptions#11661
[MAINTENANCE] Human-readable MSSQL test connection exceptions#11661tyler-hoffman merged 13 commits intodevelopfrom
Conversation
✅ Deploy Preview for niobium-lead-7998 canceled.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #11661 +/- ##
============================================
- Coverage 84.25% 72.75% -11.50%
============================================
Files 472 471 -1
Lines 39727 39759 +32
============================================
- Hits 33471 28926 -4545
- Misses 6256 10833 +4577 Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #11661 +/- ##
===========================================
- Coverage 84.25% 83.13% -1.12%
===========================================
Files 472 473 +1
Lines 39727 39761 +34
===========================================
- Hits 33471 33057 -414
- Misses 6256 6704 +448
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #11661 +/- ##
===========================================
+ Coverage 84.25% 84.27% +0.01%
===========================================
Files 472 473 +1
Lines 39727 39761 +34
===========================================
+ Hits 33471 33507 +36
+ Misses 6256 6254 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
NathanFarmer
left a comment
There was a problem hiding this comment.
Looking good except for recent name changes
| def __init__(self, cause: pyodbc.OperationalError) -> None: | ||
| super().__init__( | ||
| cause=cause, | ||
| message="Azure AD authentication failed. Verify your client ID, secret, and tenant ID.", |
There was a problem hiding this comment.
| message="Azure AD authentication failed. Verify your client ID, secret, and tenant ID.", | |
| message="Entra ID authentication failed. Verify your client ID, secret, and tenant ID.", |
|
|
||
|
|
||
| @pytest.fixture | ||
| def azure_ad_service_principal_datasource() -> SQLServerDatasource: |
There was a problem hiding this comment.
| def azure_ad_service_principal_datasource() -> SQLServerDatasource: | |
| def entra_id_service_principal_datasource() -> SQLServerDatasource: |
|
|
||
| @pytest.fixture | ||
| def azure_ad_service_principal_datasource() -> SQLServerDatasource: | ||
| """SQL Server datasource with Azure AD Service Principal auth.""" |
There was a problem hiding this comment.
| """SQL Server datasource with Azure AD Service Principal auth.""" | |
| """SQL Server datasource with Entra ID Service Principal auth.""" |
| sql_server_datasource.test_connection() | ||
|
|
||
| @with_mock_engine_raising(sa.exc.OperationalError("Login failed for user", None, Exception())) | ||
| def test_login_failure_azure_ad_service_principal_raises_sql_principal_auth_error( |
There was a problem hiding this comment.
| def test_login_failure_azure_ad_service_principal_raises_sql_principal_auth_error( | |
| def test_login_failure_entra_id_service_principal_raises_sql_principal_auth_error( |
invoke lint(usesruff format+ruff check)For more information about contributing, visit our community resources.
After you submit your PR, keep the page open and monitor the statuses of the various checks made by our continuous integration process at the bottom of the page. Please fix any issues that come up and reach out on Slack if you need help. Thanks for contributing!