This is an automated email from the ASF dual-hosted git repository.
eladkal 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 3c0f9b10c1 Resolve google data pipelines deprecations in tests (#40500)
3c0f9b10c1 is described below
commit 3c0f9b10c103869c5ba5aedd2e98f9b005d884cd
Author: Gopal Dirisala <[email protected]>
AuthorDate: Sun Jun 30 11:18:35 2024 +0530
Resolve google data pipelines deprecations in tests (#40500)
---
tests/deprecations_ignore.yml | 3 ---
.../providers/google/cloud/operators/test_datapipeline.py | 14 +++++++-------
2 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/tests/deprecations_ignore.yml b/tests/deprecations_ignore.yml
index 36a27794cb..4151eca54a 100644
--- a/tests/deprecations_ignore.yml
+++ b/tests/deprecations_ignore.yml
@@ -168,9 +168,6 @@
-
tests/providers/google/cloud/hooks/vertex_ai/test_custom_job.py::TestCustomJobWithoutDefaultProjectIdHook::test_delete_pipeline_job
-
tests/providers/google/cloud/hooks/vertex_ai/test_custom_job.py::TestCustomJobWithoutDefaultProjectIdHook::test_get_pipeline_job
-
tests/providers/google/cloud/hooks/vertex_ai/test_custom_job.py::TestCustomJobWithoutDefaultProjectIdHook::test_list_pipeline_jobs
--
tests/providers/google/cloud/operators/test_automl.py::TestAutoMLTrainModelOperator::test_execute
--
tests/providers/google/cloud/operators/test_datapipeline.py::TestCreateDataPipelineOperator::test_execute
--
tests/providers/google/cloud/operators/test_datapipeline.py::TestRunDataPipelineOperator::test_execute
-
tests/providers/google/cloud/operators/test_dataproc.py::TestDataProcHadoopOperator::test_execute
-
tests/providers/google/cloud/operators/test_dataproc.py::TestDataProcHiveOperator::test_builder
-
tests/providers/google/cloud/operators/test_dataproc.py::TestDataProcHiveOperator::test_execute
diff --git a/tests/providers/google/cloud/operators/test_datapipeline.py
b/tests/providers/google/cloud/operators/test_datapipeline.py
index 1b403d67fb..130b58d409 100644
--- a/tests/providers/google/cloud/operators/test_datapipeline.py
+++ b/tests/providers/google/cloud/operators/test_datapipeline.py
@@ -21,9 +21,9 @@ from unittest import mock
import pytest
-from airflow.providers.google.cloud.operators.datapipeline import (
- CreateDataPipelineOperator,
- RunDataPipelineOperator,
+from airflow.providers.google.cloud.operators.dataflow import (
+ DataflowCreatePipelineOperator,
+ DataflowRunPipelineOperator,
)
TASK_ID = "test-datapipeline-operators"
@@ -58,7 +58,7 @@ class TestCreateDataPipelineOperator:
"""
Creates a mock create datapipeline operator to be used in testing.
"""
- return CreateDataPipelineOperator(
+ return DataflowCreatePipelineOperator(
task_id="test_create_datapipeline",
body=TEST_BODY,
project_id=TEST_PROJECT_ID,
@@ -89,11 +89,11 @@ class TestRunDataPipelineOperator:
@pytest.fixture
def run_operator(self):
"""
- Create a RunDataPipelineOperator instance with test data
+ Create a DataflowRunPipelineOperator instance with test data
"""
- return RunDataPipelineOperator(
+ return DataflowRunPipelineOperator(
task_id=TASK_ID,
- data_pipeline_name=TEST_DATA_PIPELINE_NAME,
+ pipeline_name=TEST_DATA_PIPELINE_NAME,
project_id=TEST_PROJECT_ID,
location=TEST_LOCATION,
gcp_conn_id=TEST_GCP_CONN_ID,