Skip to content

Add tests for links/base and links/bigquery in Google provider - #68066

Merged
shahar1 merged 1 commit into
apache:mainfrom
xchwan:add_google_provider_test
Jun 17, 2026
Merged

shahar1 merged 1 commit into
apache:mainfrom
xchwan:add_google_provider_test

Conversation

@xchwan

@xchwan xchwan commented Jun 5, 2026 •

Copy link
Copy Markdown
Contributor

issue: #35442

Added test_base.py

Tests for BaseGoogleLink — the shared base class all Google links inherit from. Covers:

  • xcom_key property returns self.key
  • persist() pushes the correct key/value to XCom
  • get_config() returns None when no config found; merges extra_links_params from operator with XCom value; XCom takes precedence over operator params
  • _format_link() prepends BASE_LINK for relative paths; returns "" on missing format key; returns absolute URLs unchanged
  • get_link() returns "" when no config; passes through existing http URLs without re-formatting; formats URL from config

Added test_bigquery.py

Tests for BigQueryDatasetLink, BigQueryTableLink, BigQueryJobDetailLink. Each class covers:

  • Class attributes (key, name, format_str)
  • persist() calls xcom_push with correct key and values
  • _format_link() produces the expected URL

Was generative AI tooling used to co-author this PR?
  • Yes (claude sonnet 4.6)

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

@xchwan
xchwan requested a review from shahar1 as a code owner June 5, 2026 08:48
@boring-cyborg boring-cyborg Bot added area:providers provider:google Google (including GCP) related issues labels Jun 5, 2026
@potiuk potiuk added the ready for maintainer review Set after triaging when all criteria pass. label Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers provider:google Google (including GCP) related issues ready for maintainer review Set after triaging when all criteria pass.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants