juditnovak commented on code in PR #59390:
URL: https://github.com/apache/airflow/pull/59390#discussion_r2616410567
##########
contributing-docs/testing/system_tests.rst:
##########
@@ -54,6 +70,41 @@ set it before running test command.
SYSTEM_TESTS_ENV_ID=SOME_RANDOM_VALUE
+Executor
+........
+
+Regarding the usage of Executors: by default Airflow System tests are not
using an Airflow executor. But instead
+simulate the core behavior of a simple, generic one (like ``LocalExecutor``).
+
+In case you would like to have an actual Executor involved, you need to set
the following variable:
+
+.. code-block:: bash
+
+ export _AIRFLOW__SYSTEM_TEST_USE_EXECUTOR = 1
+
+
+Custom configuration file
+.........................
+
+.. note:: This section mostly corresponds when developing custom providers,
outside of the Apache Airflow codebase
+
+The Airflow configuration system works in a way, that for test environments
specific test configuration file locations
+are enforced to avoid accidentally loading configuration of valid Airflow
installations. There are pytest fixtures
+available for Airflow Unit tests, however those are not possible to be used
for Airflow System tests.
+
+An option to load a custom configuration file for your System Tests may be to
add something similar to `conftest.py`, to
+an early stage of pytest session initialization (for example in the
``pytest_configure`` function):
+
+.. code-block:: python
+
+ from airflow.configuration import conf
+
+ conf.read_file(open(f"{YOUR_TEST_CONFIG_FILE}"))
+
+Custom configuraion allows an easy way to load numerous custom options at once
(typically ones that may correspond
+to custom providers).
Review Comment:
I have drafted Proposal https://github.com/apache/airflow/pull/59389 that
may allow for handier way to do this. However I understand the strong
protection within the Airflow testuite to avoid any interference across
deployments, thus I understand that such a change may not be deseired.
--
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]