aritra24 commented on code in PR #41004:
URL: https://github.com/apache/airflow/pull/41004#discussion_r1690157448
##########
contributing-docs/testing/unit_tests.rst:
##########
@@ -738,6 +738,39 @@ You can also use fixture to create object that needs
database just like this.
conn = request.getfixturevalue(conn)
...
+Running tests with Database isolation
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Running tests with DB isolation is a special case of tess that require
``internal-api`` component to be
Review Comment:
Tests*
##########
contributing-docs/testing/unit_tests.rst:
##########
@@ -738,6 +738,39 @@ You can also use fixture to create object that needs
database just like this.
conn = request.getfixturevalue(conn)
...
+Running tests with Database isolation
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Running tests with DB isolation is a special case of tess that require
``internal-api`` component to be
+started in order to execute the tests. Only selected tests can be run with the
database isolation
+(TODO: add the list) - they are simulating running untrusted components (dag
file processor, triggerer,
Review Comment:
Is the todo something missed or something to be added in a follow-up later?
##########
airflow/settings.py:
##########
@@ -281,6 +281,59 @@ def remove(*args, **kwargs):
pass
+AIRFLOW_PATH_FOR_TESTS = os.path.dirname(os.path.dirname(__file__))
+AIRFLOW_TESTS_PATH_FOR_TESTS = os.path.join(AIRFLOW_PATH_FOR_TESTS, "tests")
+
+
+class TracebackSessionForTests:
+ """
+ Session that throws error when you try to create a session outside of the
test code.
+
+ When we run our tests in "db isolation" mode we except that "airflow" code
will never create
Review Comment:
Expect*
--
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]