josh-fell commented on a change in pull request #19079:
URL: https://github.com/apache/airflow/pull/19079#discussion_r733934627
##########
File path: airflow/providers/microsoft/azure/hooks/data_factory.py
##########
@@ -144,10 +144,13 @@ def get_conn(self) -> DataFactoryManagementClient:
tenant = conn.extra_dejson.get('extra__azure_data_factory__tenantId')
subscription_id =
conn.extra_dejson.get('extra__azure_data_factory__subscriptionId')
- self._conn = DataFactoryManagementClient(
- credential=ClientSecretCredential(
+ credential = DefaultAzureCredential()
+ if conn.login is not None and conn.password is not None:
+ credential = ClientSecretCredential(
client_id=conn.login, client_secret=conn.password,
tenant_id=tenant
- ),
+ )
+ self._conn = DataFactoryManagementClient(
+ credential=credential,
Review comment:
Check out [this
doc](https://github.com/apache/airflow/blob/main/TESTING.rst#airflow-unit-tests).
It details how to run unit tests locally within a couple IDEs or
Breeze/virtualenv.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]