123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- # 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.
- # NOTE FOR CONTRIBUTORS:
- #
- # Values specified in this file are automatically used in our unit tests
- # run by pytest and override default airflow configuration values provided by config.yml.
- #
- # These configuration settings should provide consistent environment to run tests -
- # no matter if you are in Breeze env or use local venv or even run tests in the CI environment.
- #
- # If you want to have all unit tests to get some default configuration value, you should set it here.
- #
- # You can instead use ``conf_vars`` context manager or override the ``AIRFLOW__<SECTION>__<KEY>`` environment
- # variable to set the configuration value for a specific test or a group of tests.
- #
- # The test configuration is loaded via setting AIRFLOW__CORE__UNIT_TEST_MODE=True
- # in a pytest fixture in tests/conftest.py. This in turn triggers reloading of the configuration
- # from this file after cleaning the respective configuration retrieved during initialization
- # of configuration. See ``load_test_config`` function in ``airflow/config.py`` for details.
- #
- [core]
- # We want to read dags from the test dags folder
- dags_folder = {TEST_DAGS_FOLDER}
- # we want to read plugins from example_dags/plugins folder
- plugins_folder = {TEST_PLUGINS_FOLDER}
- # we want to read fernet key generated dynamically in load_test_config
- fernet_key = {FERNET_KEY}
- # for tests we use local executor by default
- executor = LocalExecutor
- # We do not want dags to be paused at creation
- dags_are_paused_at_creation = False
- # We want to load examples
- load_examples = True
- # We want pickling to be enabled in tests
- donot_pickle = False
- # No default impersonation in tests - tests that run impersonation should set this explicitly
- default_impersonation =
- # We want to use unit test mode (though technically it is not needed as we set it in pytest fixture
- # via AIRFLOW__CORE__UNIT_TEST_MODE environment variable)
- unit_test_mode = True
- # We want to use a shorter timeout for task cleanup
- killed_task_cleanup_time = 5
- # We only allow our own classes to be deserialized in tests
- allowed_deserialization_classes = airflow.* tests.*
- [database]
- [logging]
- # celery tests rely on it being set
- celery_logging_level = INFO
- [smtp]
- # Used as default values for SMTP unit tests
- smtp_user = airflow
- smtp_password = airflow
- smtp_mail_from = airflow@example.com
- [api]
- auth_backends = airflow.api.auth.backend.default
- [hive]
- # Hive uses the configuration below to run the tests
- default_hive_mapred_queue: airflow
- [celery]
- # used to test that we can load celery config from airflow.cfg
- broker_url = amqp://guest:guest@rabbitmq:5672/
- # and same for result backend
- result_backend = db+mysql://airflow:airflow@localhost:3306/airflow
- [scheduler]
- # Those values are set so that during unit tests things run faster than usual
- job_heartbeat_sec = 1
- scheduler_heartbeat_sec = 5
- parsing_processes = 2
- dag_dir_list_interval = 0
- [triggerer]
- # Those values are set so that during unit tests things run faster than usual.
- # Triggerer heartbeat intentionally different from scheduler to catch bad assumptions in code
- # that they are the same which by default they are in production but they can be configured differently
- # by users.
- job_heartbeat_sec = 2
- [example_section]
- # This section is used to test coercions of configuration values retrieval
- string_value = 21600
- only_bool_value = true
- only_float_value = 12.0
- only_integer_value = 21600
- only_string_value = this is a test
|