Skip to content

Commit

Permalink
fix google datacatalog operator tests (#44281)
Browse files Browse the repository at this point in the history
* fix google datacatalog operator tests

* bump google-cloud-datacatalog
  • Loading branch information
gopidesupavan authored Nov 22, 2024
1 parent f33166a commit f6bbc63
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion generated/provider_dependencies.json
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@
"google-cloud-build>=3.22.0",
"google-cloud-compute>=1.10.0",
"google-cloud-container>=2.17.4",
"google-cloud-datacatalog>=3.11.1",
"google-cloud-datacatalog>=3.23.0",
"google-cloud-dataflow-client>=0.8.6",
"google-cloud-dataform>=0.5.0",
"google-cloud-dataplex>=1.10.0",
Expand Down
2 changes: 1 addition & 1 deletion providers/src/airflow/providers/google/provider.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ dependencies:
- google-cloud-build>=3.22.0
- google-cloud-compute>=1.10.0
- google-cloud-container>=2.17.4
- google-cloud-datacatalog>=3.11.1
- google-cloud-datacatalog>=3.23.0
- google-cloud-dataflow-client>=0.8.6
- google-cloud-dataform>=0.5.0
- google-cloud-dataplex>=1.10.0
Expand Down
16 changes: 14 additions & 2 deletions providers/tests/google/cloud/operators/test_datacatalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,20 @@
"name": TEST_ENTRY_PATH,
}
TEST_ENTRY_GROUP: EntryGroup = EntryGroup(name=TEST_ENTRY_GROUP_PATH)
TEST_ENTRY_GROUP_DICT: dict = {"description": "", "display_name": "", "name": TEST_ENTRY_GROUP_PATH}
TEST_ENTRY_GROUP_DICT: dict = {
"description": "",
"display_name": "",
"name": TEST_ENTRY_GROUP_PATH,
"transferred_to_dataplex": False,
}
TEST_TAG: Tag = Tag(name=TEST_TAG_PATH)
TEST_TAG_DICT: dict = {"fields": {}, "name": TEST_TAG_PATH, "template": "", "template_display_name": ""}
TEST_TAG_DICT: dict = {
"fields": {},
"name": TEST_TAG_PATH,
"template": "",
"template_display_name": "",
"dataplex_transfer_status": 0,
}
TEST_TAG_TEMPLATE: TagTemplate = TagTemplate(name=TEST_TAG_TEMPLATE_PATH)
TEST_TAG_TEMPLATE_DICT: dict = {
"display_name": "",
Expand Down Expand Up @@ -172,6 +183,7 @@ def test_assert_valid_hook_call(self, mock_xcom, mock_hook) -> None:
"project_id": TEST_PROJECT_ID,
},
)

assert TEST_ENTRY_DICT == result

@mock.patch("airflow.providers.google.cloud.operators.datacatalog.CloudDataCatalogHook")
Expand Down

0 comments on commit f6bbc63

Please sign in to comment.