xianhualiu commented on code in PR #32678:
URL: https://github.com/apache/airflow/pull/32678#discussion_r1267253020


##########
tests/providers/google/cloud/operators/test_datapipeline.py:
##########
@@ -0,0 +1,72 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+from __future__ import annotations
+
+from unittest import mock
+from unittest.mock import MagicMock
+
+import pytest as pytest
+
+import airflow
+from airflow.exceptions import AirflowException, 
AirflowProviderDeprecationWarning
+from airflow.providers.google.cloud.operators.datapipeline import (
+    CreateDataPipelineOperator,
+    RunDataPipelineOperator,
+)
+from airflow.providers.google.cloud.hooks.datapipeline import DataPipelineHook
+from airflow.version import version
+
+TASK_ID = "test-datapipeline-operators"
+TEST_BODY = {
+    "name": 
"projects/dataflow-interns/locations/us-central1/pipelines/dp-create-1642676351302-mp--1675461000",
+            "type": "PIPELINE_TYPE_BATCH",
+            "workload": {
+                "dataflowFlexTemplateRequest": {
+                "launchParameter": {
+                    "containerSpecGcsPath": 
"gs://intern-bucket-1/templates/word-count.json",
+                    "jobName": "word-count-test-intern1",
+                    "environment": {
+                    "tempLocation": "gs://intern-bucket-1/temp"
+                    },
+                    "parameters": {
+                    "inputFile": "gs://intern-bucket-1/examples/kinglear.txt",

Review Comment:
   please use more permanent gs pathes like 
https://github.com/apache/airflow/blob/375d2fabcc2cef4b17d2129b557ac6fcb6c65067/tests/providers/google/cloud/operators/test_dataflow.py#L42C3-L42C3
   
   For example:
      ""containerSpecGcsPath": 
"gs://dataflow-templates-us-central1/latest/Word_Count_metadata"
       "inputFile": "gs://dataflow-samples/shakespeare/kinglear.txt",
       "output": "gs://test/output/my_output",



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