vineoy opened a new pull request, #75694:
URL: https://github.com/apache/airflow/pull/75694

   #### Description
   
   This PR adds the missing unit tests for three Google Cloud provider link 
modules —
   `cloud/links/dataproc.py`, `cloud/links/kubernetes_engine.py`, 
`cloud/links/translate.py` —
   and removes their three remaining exemptions from `OVERLOOKED_TESTS` in
   `airflow-core/tests/unit/always/test_project_structure.py`.
   
   The structure checker 
(`TestProjectStructure::test_providers_modules_should_have_tests`) treats
   those exemptions as outstanding test debt: as soon as the test file for an 
exempted entry shows
   up in the tree, the suite fails with *"Detect added tests in providers 
module - please remove the
   tests from OVERLOOKED_TESTS list above"*. The intended fix for an entry is 
therefore always the
   pairing done here: add the real tests, drop the exemption.
   
   Design notes (guided by the review feedback on the earlier, now-closed 
attempts at these files):
   
   - Expected console URLs are asserted as **hard-coded literals** for path and 
query — never
     derived from the same `format_str`/`.format()` call the production code 
uses — so a broken or
     hand-edited format string fails the test.
   - XCom link `key` values are asserted as literal strings as well; they are 
stored in XComs and
     serialized DAGs, so merely mirroring the module constant would not catch a 
rename.
   - Style follows the existing tests for sibling link modules, e.g. 
`test_bigquery.py`.
   - Kept as a single PR covering all three modules, since removing the three 
`OVERLOOKED_TESTS`
     exemptions in one go keeps the structural test consistent.
   
   related: #72970, #72971, #72975
   
   #### Tests
   
   Added in this PR: `test_translate.py` (29 tests), `test_dataproc.py` (22),
   `test_kubernetes_engine.py` (12) — 63 tests in total.
   
   Verified locally on upstream `main` at `d22f4e4` (Python 3.13, Linux):
   
   - `uv run --project providers/google pytest 
providers/google/tests/unit/google/cloud/links -q` → **147 passed**
   - `uv run --project airflow-core pytest 
"...test_project_structure.py::TestProjectStructure::test_providers_modules_should_have_tests"`
 → **1 passed** (with the three entries removed)
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes (please specify the tool below)
   
   Generated-by: [OpenCode](https://opencode.ai) following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   


-- 
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]

Reply via email to