feluelle commented on a change in pull request #8877:
URL: https://github.com/apache/airflow/pull/8877#discussion_r425906307



##########
File path: tests/providers/amazon/aws/operators/test_s3_to_redshift_system.py
##########
@@ -0,0 +1,62 @@
+#
+# 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 tempfile import NamedTemporaryFile
+
+import pytest
+
+from airflow.providers.amazon.aws.example_dags.example_s3_to_redshift import (
+    REDSHIFT_SCHEMA, REDSHIFT_TABLE, S3_BUCKET, S3_KEY,
+)
+from tests.test_utils.amazon_system_helpers import (
+    AWS_DAG_FOLDER, AmazonSystemTest, provide_aws_context, 
provide_aws_s3_bucket, provide_aws_s3_key,
+)
+from tests.test_utils.postgres_system_helpers import provide_postgres_schema, 
provide_postgres_table
+
+
+@pytest.fixture
+def provide_s3_bucket_with_key():
+    with provide_aws_s3_bucket(name=S3_BUCKET, region='eu-central-1') as 
s3_bucket:

Review comment:
       I needed to add the `region` parameter so the s3 bucket will be created 
in that region. Because otherwise it would be in `us` and my existing cluster 
is in `eu`. The `COPY` command does not work across regions. :/




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to