You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2024/08/19 09:29:01 UTC

(airflow) branch main updated: Refactor dataplex system tests (#41573)

This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new db5b3b7df3 Refactor dataplex system tests (#41573)
db5b3b7df3 is described below

commit db5b3b7df36d9be7b9821c230ecb234013dea42e
Author: VladaZakharova <80...@users.noreply.github.com>
AuthorDate: Mon Aug 19 11:28:53 2024 +0200

    Refactor dataplex system tests (#41573)
---
 tests/system/providers/google/cloud/dataplex/example_dataplex.py   | 2 +-
 .../system/providers/google/cloud/dataplex/example_dataplex_dp.py  | 5 +++--
 .../system/providers/google/cloud/dataplex/example_dataplex_dq.py  | 7 ++++---
 3 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/tests/system/providers/google/cloud/dataplex/example_dataplex.py b/tests/system/providers/google/cloud/dataplex/example_dataplex.py
index bac7e56ed5..a0ac55e07f 100644
--- a/tests/system/providers/google/cloud/dataplex/example_dataplex.py
+++ b/tests/system/providers/google/cloud/dataplex/example_dataplex.py
@@ -53,7 +53,7 @@ SPARK_FILE_NAME = "spark_example_pi.py"
 RESOURCE_DATA_BUCKET = "airflow-system-tests-resources"
 
 LAKE_ID = f"lake-{DAG_ID}-{ENV_ID}".replace("_", "-")
-REGION = "us-central1"
+REGION = "us-west1"
 
 SERVICE_ACC = f"{PROJECT_ID}@appspot.gserviceaccount.com"
 
diff --git a/tests/system/providers/google/cloud/dataplex/example_dataplex_dp.py b/tests/system/providers/google/cloud/dataplex/example_dataplex_dp.py
index 168144a855..bfb187371b 100644
--- a/tests/system/providers/google/cloud/dataplex/example_dataplex_dp.py
+++ b/tests/system/providers/google/cloud/dataplex/example_dataplex_dp.py
@@ -50,11 +50,12 @@ from airflow.providers.google.cloud.operators.dataplex import (
 )
 from airflow.providers.google.cloud.sensors.dataplex import DataplexDataProfileJobStatusSensor
 from airflow.utils.trigger_rule import TriggerRule
+from tests.system.providers.google import DEFAULT_GCP_SYSTEM_TEST_PROJECT_ID
 
 ENV_ID = os.environ.get("SYSTEM_TESTS_ENV_ID")
-PROJECT_ID = os.environ.get("SYSTEM_TESTS_GCP_PROJECT", "default")
+PROJECT_ID = os.environ.get("SYSTEM_TESTS_GCP_PROJECT") or DEFAULT_GCP_SYSTEM_TEST_PROJECT_ID
 
-DAG_ID = "example_dataplex_data_profile"
+DAG_ID = "dataplex_data_profile"
 
 LAKE_ID = f"lake-{DAG_ID}-{ENV_ID}".replace("_", "-")
 REGION = "us-central1"
diff --git a/tests/system/providers/google/cloud/dataplex/example_dataplex_dq.py b/tests/system/providers/google/cloud/dataplex/example_dataplex_dq.py
index c02756efed..668647d9ac 100644
--- a/tests/system/providers/google/cloud/dataplex/example_dataplex_dq.py
+++ b/tests/system/providers/google/cloud/dataplex/example_dataplex_dq.py
@@ -50,14 +50,15 @@ from airflow.providers.google.cloud.operators.dataplex import (
 )
 from airflow.providers.google.cloud.sensors.dataplex import DataplexDataQualityJobStatusSensor
 from airflow.utils.trigger_rule import TriggerRule
+from tests.system.providers.google import DEFAULT_GCP_SYSTEM_TEST_PROJECT_ID
 
 ENV_ID = os.environ.get("SYSTEM_TESTS_ENV_ID")
-PROJECT_ID = os.environ.get("SYSTEM_TESTS_GCP_PROJECT", "default")
+PROJECT_ID = os.environ.get("SYSTEM_TESTS_GCP_PROJECT") or DEFAULT_GCP_SYSTEM_TEST_PROJECT_ID
 
-DAG_ID = "example_dataplex_data_quality"
+DAG_ID = "dataplex_data_quality"
 
 LAKE_ID = f"lake-{DAG_ID}-{ENV_ID}".replace("_", "-")
-REGION = "us-central1"
+REGION = "us-west1"
 
 DATASET = f"dataset_bq_{DAG_ID}_{ENV_ID}"