Repository navigation
Add unit tests for the Data Fusion links - #72969
ShousenZHANG wants to merge 1 commit into
Conversation
`providers/google/tests/unit/google/cloud/links/test_datafusion.py` was listed
in `OVERLOOKED_TESTS`, so `DataFusionInstanceLink`, `DataFusionPipelineLink`
and `DataFusionPipelinesLink` had no coverage.
Adds class-attribute, `persist` and `_format_link` checks for each of them,
following the shape of `test_bigquery.py` in the same directory.
Two different shapes live in this module: `DATAFUSION_INSTANCE_LINK` is built
on `BASE_LINK`, while the two pipeline links are `{uri}`-relative and resolve
against the Data Fusion instance endpoint rather than the console, so
`_format_link` returns them unprefixed. Both shapes are covered.
Drops the path from `OVERLOOKED_TESTS`.
related: #35442
Generated-by: Claude Code
|
Closing this along with the other 19 PRs opened from this account today. These are the first 20 PRs from this account, and 17 of them were opened inside a two-minute window, between 14:59:50Z and 15:01:43Z, about seven seconds apart. Each carries Airflow is maintained by volunteers, so every PR costs reviewer time and CI capacity. |
|
Also, one PR per module is the wrong unit: twenty PRs for one logical change is twenty reviews and twenty CI runs, when it should have been a single PR. The tests add little on their own merits either, since |
providers/google/tests/unit/google/cloud/links/test_datafusion.pywas listed inOVERLOOKED_TESTS, soDataFusionInstanceLink,DataFusionPipelineLinkandDataFusionPipelinesLinkhad no coverage.Adds the checks the sibling link tests use, for each class:
test_class_attributes—key,name,format_strtest_persist— the XCom payload pushed byBaseGoogleLink.persisttest_format_link— the_format_linkoutputTwo different shapes live in this module:
DATAFUSION_INSTANCE_LINKis built onBASE_LINK, while the two pipeline links are{uri}-relative and resolve against the Data Fusion instance endpoint rather than the console, so_format_linkreturns them unprefixed. Both shapes are covered.Same shape as
test_bigquery.py(added in #68066) in the same directory, and theOVERLOOKED_TESTSentry is removed in this PR.related: #35442
Was generative AI tooling used to co-author this PR?
Generated-by: Claude CodeThe test bodies were written by an AI assistant following the existing
test_bigquery.pypattern in the same directory. I verified them myself:pytest providers/google/tests/unit/google/cloud/links/test_datafusion.py— 9 passedpytest airflow-core/tests/unit/always/test_project_structure.py— 10 passed, 1 xfailedruff check/ruff format --checkon the test file — cleanprek run --files providers/google/tests/unit/google/cloud/links/test_datafusion.py airflow-core/tests/unit/always/test_project_structure.py— 43 passed, 212 skipped, 0 failed