This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 81fcc721ee Basic exclusions for DB Isolation mode (#41079)
81fcc721ee is described below

commit 81fcc721ee8d0a8add1f1c7469dbc955c0d10cdf
Author: Jarek Potiuk <[email protected]>
AuthorDate: Sun Jul 28 13:15:37 2024 +0200

    Basic exclusions for DB Isolation mode (#41079)
    
    After creating the full test harness for the DB isolation mode
    in #41067, and runnning the whole test suite, this is the result
    of first pass of exclusions of those tests that are not relevant
    for the DB isolation mode.
    
    Related: #41067
---
 tests/always/test_example_dags.py                                    | 1 +
 tests/api_connexion/endpoints/test_config_endpoint.py                | 2 +-
 tests/api_connexion/endpoints/test_connection_endpoint.py            | 2 +-
 tests/api_experimental/auth/backend/test_basic_auth.py               | 2 +-
 tests/api_experimental/common/test_mark_tasks.py                     | 2 +-
 tests/cli/commands/test_dag_command.py                               | 2 +-
 tests/cli/commands/test_dag_processor_command.py                     | 2 +-
 tests/jobs/test_backfill_job.py                                      | 2 +-
 .../security_manager/test_aws_security_manager_override.py           | 2 ++
 tests/providers/amazon/aws/auth_manager/test_aws_auth_manager.py     | 5 ++++-
 tests/www/api/experimental/test_dag_runs_endpoint.py                 | 2 +-
 tests/www/api/experimental/test_endpoints.py                         | 2 +-
 tests/www/test_app.py                                                | 2 +-
 13 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/tests/always/test_example_dags.py 
b/tests/always/test_example_dags.py
index 0635f8042a..d8c97ca4f0 100644
--- a/tests/always/test_example_dags.py
+++ b/tests/always/test_example_dags.py
@@ -189,6 +189,7 @@ def test_should_be_importable(example: str):
     assert len(dagbag.dag_ids) >= 1
 
 
[email protected]_if_database_isolation_mode
 @pytest.mark.db_test
 @pytest.mark.parametrize("example", 
example_not_excluded_dags(xfail_db_exception=True))
 def test_should_not_do_database_queries(example: str):
diff --git a/tests/api_connexion/endpoints/test_config_endpoint.py 
b/tests/api_connexion/endpoints/test_config_endpoint.py
index 3dd5814e5d..ea4f6e9647 100644
--- a/tests/api_connexion/endpoints/test_config_endpoint.py
+++ b/tests/api_connexion/endpoints/test_config_endpoint.py
@@ -25,7 +25,7 @@ from airflow.security import permissions
 from tests.test_utils.api_connexion_utils import assert_401, create_user, 
delete_user
 from tests.test_utils.config import conf_vars
 
-pytestmark = pytest.mark.db_test
+pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode]
 
 
 MOCK_CONF = {
diff --git a/tests/api_connexion/endpoints/test_connection_endpoint.py 
b/tests/api_connexion/endpoints/test_connection_endpoint.py
index 7e287af755..75a745c76d 100644
--- a/tests/api_connexion/endpoints/test_connection_endpoint.py
+++ b/tests/api_connexion/endpoints/test_connection_endpoint.py
@@ -31,7 +31,7 @@ from tests.test_utils.config import conf_vars
 from tests.test_utils.db import clear_db_connections
 from tests.test_utils.www import _check_last_log
 
-pytestmark = pytest.mark.db_test
+pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode]
 
 
 @pytest.fixture(scope="module")
diff --git a/tests/api_experimental/auth/backend/test_basic_auth.py 
b/tests/api_experimental/auth/backend/test_basic_auth.py
index a7f7a2a1cd..162f96e5a8 100644
--- a/tests/api_experimental/auth/backend/test_basic_auth.py
+++ b/tests/api_experimental/auth/backend/test_basic_auth.py
@@ -24,7 +24,7 @@ from flask_login import current_user
 from airflow.exceptions import RemovedInAirflow3Warning
 from tests.test_utils.db import clear_db_pools
 
-pytestmark = pytest.mark.db_test
+pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode]
 
 
 class TestBasicAuth:
diff --git a/tests/api_experimental/common/test_mark_tasks.py 
b/tests/api_experimental/common/test_mark_tasks.py
index 83b966c209..e90938ca69 100644
--- a/tests/api_experimental/common/test_mark_tasks.py
+++ b/tests/api_experimental/common/test_mark_tasks.py
@@ -43,7 +43,7 @@ from tests.test_utils.mapping import expand_mapped_task
 
 DEV_NULL = "/dev/null"
 
-pytestmark = pytest.mark.db_test
+pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode]
 
 
 @pytest.fixture(scope="module")
diff --git a/tests/cli/commands/test_dag_command.py 
b/tests/cli/commands/test_dag_command.py
index a8e863ffc4..d8322f27dd 100644
--- a/tests/cli/commands/test_dag_command.py
+++ b/tests/cli/commands/test_dag_command.py
@@ -58,7 +58,7 @@ else:
 
 # TODO: Check if tests needs side effects - locally there's missing DAG
 
-pytestmark = pytest.mark.db_test
+pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode]
 
 
 class TestCliDags:
diff --git a/tests/cli/commands/test_dag_processor_command.py 
b/tests/cli/commands/test_dag_processor_command.py
index 59da9efbb9..2b84f506e7 100644
--- a/tests/cli/commands/test_dag_processor_command.py
+++ b/tests/cli/commands/test_dag_processor_command.py
@@ -26,7 +26,7 @@ from airflow.cli.commands import dag_processor_command
 from airflow.configuration import conf
 from tests.test_utils.config import conf_vars
 
-pytestmark = pytest.mark.db_test
+pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode]
 
 
 class TestDagProcessorCommand:
diff --git a/tests/jobs/test_backfill_job.py b/tests/jobs/test_backfill_job.py
index 41630f8586..e46f27ed62 100644
--- a/tests/jobs/test_backfill_job.py
+++ b/tests/jobs/test_backfill_job.py
@@ -70,7 +70,7 @@ from tests.test_utils.db import (
 from tests.test_utils.mock_executor import MockExecutor
 from tests.test_utils.timetables import cron_timetable
 
-pytestmark = pytest.mark.db_test
+pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode]
 
 logger = logging.getLogger(__name__)
 
diff --git 
a/tests/providers/amazon/aws/auth_manager/security_manager/test_aws_security_manager_override.py
 
b/tests/providers/amazon/aws/auth_manager/security_manager/test_aws_security_manager_override.py
index 62da8b6339..69b48f4f0c 100644
--- 
a/tests/providers/amazon/aws/auth_manager/security_manager/test_aws_security_manager_override.py
+++ 
b/tests/providers/amazon/aws/auth_manager/security_manager/test_aws_security_manager_override.py
@@ -29,6 +29,8 @@ with ignore_provider_compatibility_error("2.8.0", __file__):
     )
 from airflow.www.extensions.init_appbuilder import init_appbuilder
 
+pytestmark = pytest.mark.skip_if_database_isolation_mode
+
 
 @pytest.fixture
 def appbuilder():
diff --git a/tests/providers/amazon/aws/auth_manager/test_aws_auth_manager.py 
b/tests/providers/amazon/aws/auth_manager/test_aws_auth_manager.py
index a4a9472000..c26c07cd8b 100644
--- a/tests/providers/amazon/aws/auth_manager/test_aws_auth_manager.py
+++ b/tests/providers/amazon/aws/auth_manager/test_aws_auth_manager.py
@@ -66,7 +66,10 @@ from tests.test_utils.www import check_content_in_response
 if TYPE_CHECKING:
     from airflow.auth.managers.base_auth_manager import ResourceMethod
 
-pytestmark = pytest.mark.skipif(not AIRFLOW_V_2_9_PLUS, reason="Test requires 
Airflow 2.9+")
+pytestmark = [
+    pytest.mark.skipif(not AIRFLOW_V_2_9_PLUS, reason="Test requires Airflow 
2.9+"),
+    pytest.mark.skip_if_database_isolation_mode,
+]
 
 mock = Mock()
 
diff --git a/tests/www/api/experimental/test_dag_runs_endpoint.py 
b/tests/www/api/experimental/test_dag_runs_endpoint.py
index 9f4bbf30bc..7ab3def6cc 100644
--- a/tests/www/api/experimental/test_dag_runs_endpoint.py
+++ b/tests/www/api/experimental/test_dag_runs_endpoint.py
@@ -26,7 +26,7 @@ from airflow.models import DagBag, DagRun
 from airflow.models.serialized_dag import SerializedDagModel
 from airflow.settings import Session
 
-pytestmark = pytest.mark.db_test
+pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode]
 
 
 class TestDagRunsEndpoint:
diff --git a/tests/www/api/experimental/test_endpoints.py 
b/tests/www/api/experimental/test_endpoints.py
index d78bc8fb37..444110b2d8 100644
--- a/tests/www/api/experimental/test_endpoints.py
+++ b/tests/www/api/experimental/test_endpoints.py
@@ -40,7 +40,7 @@ ROOT_FOLDER = os.path.realpath(
     os.path.join(os.path.dirname(os.path.realpath(__file__)), os.pardir, 
os.pardir, os.pardir, os.pardir)
 )
 
-pytestmark = pytest.mark.db_test
+pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode]
 
 
 @pytest.fixture(scope="module")
diff --git a/tests/www/test_app.py b/tests/www/test_app.py
index 1e7bd67c9a..7fd648675e 100644
--- a/tests/www/test_app.py
+++ b/tests/www/test_app.py
@@ -32,7 +32,7 @@ from airflow.www import app as application
 from tests.test_utils.config import conf_vars
 from tests.test_utils.decorators import dont_initialize_flask_app_submodules
 
-pytestmark = pytest.mark.db_test
+pytestmark = [pytest.mark.db_test, pytest.mark.skip_if_database_isolation_mode]
 
 
 class TestApp:

Reply via email to