chipmyersjr commented on a change in pull request #10760: URL: https://github.com/apache/airflow/pull/10760#discussion_r487648711
########## File path: tests/providers/google/cloud/transfers/test_salesforce_to_gcs_system.py ########## @@ -0,0 +1,73 @@ +# 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 contextlib import contextmanager +import json +import os +import pytest + +from airflow.exceptions import AirflowException +from airflow.models import Connection +from airflow.utils.process_utils import patch_environ +from tests.providers.google.cloud.utils.gcp_authenticator import GCP_BIGQUERY_KEY +from tests.test_utils.gcp_system_helpers import CLOUD_DAG_FOLDER, GoogleSystemTest, provide_gcp_context + +CREDENTIALS_DIR = os.environ.get('CREDENTIALS_DIR', '/files/airflow-breeze-config/keys') +SALESFORCE_KEY = 'salesforce.json' +SALESFORCE_CREDENTIALS_PATH = os.path.join(CREDENTIALS_DIR, SALESFORCE_KEY) +CONFIG_REQUIRED_FIELDS = ["host", "login", "password", "security_token"] +SALESFORCE_CONNECTION_ID = os.environ.get('FACEBOOK_CONNECTION_ID', 'salesforce_default') +CONNECTION_TYPE = os.environ.get('CONNECTION_TYPE', 'http') + + +@contextmanager +def provide_facebook_connection(key_file_path: str): Review comment: Sure. Moved to test_utils. Also this should be named salesforce so renamed as well. ---------------------------------------------------------------- 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: [email protected]
