Skip to content

Commit

Permalink
Fix attributes for AzureDataFactory hook (#14704)
Browse files Browse the repository at this point in the history
* Add 'conn_type', 'conn_name_attr', 'default_conn_name' and 'hook_name';
* Change expected_number_of_hooks to 62.

Resolves: #14669
  • Loading branch information
gmcrocetti committed Mar 12, 2021
1 parent 4e49adc commit 4372d45
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
Expand Up @@ -77,7 +77,12 @@ class AzureDataFactoryHook(BaseHook): # pylint: disable=too-many-public-methods
:param conn_id: The Azure Data Factory connection id.
"""

def __init__(self, conn_id: str = "azure_data_factory_default"):
conn_type: str = 'azure_data_factory'
conn_name_attr: str = 'azure_data_factory_conn_id'
default_conn_name: str = 'azure_data_factory_default'
hook_name: str = 'Azure Data Factory'

def __init__(self, conn_id: Optional[str] = default_conn_name):
self._conn: DataFactoryManagementClient = None
self.conn_id = conn_id
super().__init__()
Expand Down
Expand Up @@ -118,7 +118,7 @@ function discover_all_hooks() {
group_start "Listing available hooks via 'airflow providers hooks'"
COLUMNS=180 airflow providers hooks

local expected_number_of_hooks=61
local expected_number_of_hooks=62
local actual_number_of_hooks
actual_number_of_hooks=$(airflow providers hooks --output table | grep -c "| apache" | xargs)
if [[ ${actual_number_of_hooks} != "${expected_number_of_hooks}" ]]; then
Expand Down
1 change: 1 addition & 0 deletions tests/core/test_providers_manager.py
Expand Up @@ -96,6 +96,7 @@
'azure_container_instances',
'azure_cosmos',
'azure_data_explorer',
'azure_data_factory',
'azure_data_lake',
'cassandra',
'cloudant',
Expand Down

0 comments on commit 4372d45

Please sign in to comment.