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 70e3143558 Remove old-fashioned system test for PostgresToGCSOperator 
after its (#33431)
70e3143558 is described below

commit 70e314355838c4498ec975dcff5d00c31fbcd192
Author: max <[email protected]>
AuthorDate: Wed Aug 16 12:51:46 2023 +0000

    Remove old-fashioned system test for PostgresToGCSOperator after its 
(#33431)
    
    migration
---
 .../cloud/transfers/test_postgres_to_gcs_system.py | 89 ----------------------
 1 file changed, 89 deletions(-)

diff --git 
a/tests/providers/google/cloud/transfers/test_postgres_to_gcs_system.py 
b/tests/providers/google/cloud/transfers/test_postgres_to_gcs_system.py
deleted file mode 100644
index 262b41ca24..0000000000
--- a/tests/providers/google/cloud/transfers/test_postgres_to_gcs_system.py
+++ /dev/null
@@ -1,89 +0,0 @@
-#
-# 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
-
-import pytest
-from psycopg2 import ProgrammingError
-
-from airflow.providers.postgres.hooks.postgres import PostgresHook
-from tests.providers.google.cloud.utils.gcp_authenticator import GCP_GCS_KEY
-from tests.system.providers.google.cloud.transfers.example_postgres_to_gcs 
import BUCKET_NAME as GCS_BUCKET
-from tests.test_utils.gcp_system_helpers import CLOUD_DAG_FOLDER, 
GoogleSystemTest, provide_gcp_context
-
-CREATE_QUERY = """
-CREATE TABLE public.test_table
-(
-    id integer,
-    params json
-)
-WITH (
-    OIDS = FALSE
-)
-TABLESPACE pg_default;
-
-ALTER TABLE public.test_table
-    OWNER to postgres;
-"""
-
-LOAD_QUERY = """
-INSERT INTO test_table (id, params)
-VALUES
-   (
-      1, '{ "customer": "Lily Bush", "items": {"product": "Diaper","qty": 24}}'
-   ),
-   (
-      2, '{ "customer": "Josh William", "items": {"product": "Toy Car","qty": 
1}}'
-   ),
-   (
-      3, '{ "customer": "Mary Clark", "items": {"product": "Toy Train","qty": 
2}}'
-   );
-"""
-DELETE_QUERY = "DROP TABLE public.test_table;"
-
-
[email protected]("postgres")
[email protected]("google.cloud")
[email protected]_file(GCP_GCS_KEY)
-class TestPostgresToGCSSystem(GoogleSystemTest):
-    @staticmethod
-    def init_db():
-        try:
-            hook = PostgresHook()
-            hook.run(CREATE_QUERY)
-            hook.run(LOAD_QUERY)
-        except ProgrammingError:
-            pass
-
-    @staticmethod
-    def drop_db():
-        hook = PostgresHook()
-        hook.run(DELETE_QUERY)
-
-    @provide_gcp_context(GCP_GCS_KEY)
-    def setup_method(self):
-        self.create_gcs_bucket(GCS_BUCKET)
-        self.init_db()
-
-    @provide_gcp_context(GCP_GCS_KEY)
-    def test_run_example_dag(self):
-        self.run_dag("example_postgres_to_gcs", CLOUD_DAG_FOLDER)
-
-    @provide_gcp_context(GCP_GCS_KEY)
-    def teardown_method(self):
-        self.delete_gcs_bucket(GCS_BUCKET)
-        self.drop_db()

Reply via email to