molcay commented on code in PR #49625:
URL: https://github.com/apache/airflow/pull/49625#discussion_r2086499019


##########
providers/google/tests/system/google/cloud/gcs/example_http_to_gcs.py:
##########
@@ -0,0 +1,128 @@
+# 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.
+"""
+Example Airflow DAG for HTTP to Google Cloud Storage transfer operators.
+"""
+
+from __future__ import annotations
+
+import os
+from datetime import datetime
+
+from airflow import settings
+from airflow.decorators import task
+from airflow.models.baseoperator import chain
+from airflow.models.connection import Connection
+from airflow.models.dag import DAG
+from airflow.providers.google.cloud.operators.gcs import 
GCSCreateBucketOperator, GCSDeleteBucketOperator
+from airflow.providers.google.cloud.transfers.http_to_gcs import 
HttpToGCSOperator
+from airflow.providers.standard.operators.bash import BashOperator
+from airflow.utils.trigger_rule import TriggerRule
+
+from system.google import DEFAULT_GCP_SYSTEM_TEST_PROJECT_ID
+
+ENV_ID = os.environ.get("SYSTEM_TESTS_ENV_ID", "default")
+PROJECT_ID = os.environ.get("SYSTEM_TESTS_GCP_PROJECT") or 
DEFAULT_GCP_SYSTEM_TEST_PROJECT_ID
+
+DAG_ID = "example_http_to_gcs"
+BUCKET_NAME = f"bucket-{DAG_ID}-{ENV_ID}"
+
+cmd = """
+#!/bin/bash
+
+echo 'foo' > /tmp/test_file
+
+cd /tmp
+
+nohup python3 -m http.server 8083 > /dev/null 2>&1 &
+
+echo $!
+sleep 2
+exit 0
+"""
+
+
+@task
+def create_connection(conn_id_name: str):
+    conn = Connection(

Review Comment:
   We are about to create a PR for connection creation; when we have it; I will 
mention it here



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