diff --git a/tests/providers/google/common/auth_backend/test_google_openid.py b/tests/providers/google/common/auth_backend/test_google_openid.py index dab0eae07a23d..260ae0d6fb5e1 100644 --- a/tests/providers/google/common/auth_backend/test_google_openid.py +++ b/tests/providers/google/common/auth_backend/test_google_openid.py @@ -22,6 +22,7 @@ from google.auth.exceptions import GoogleAuthError from airflow.www.app import create_app +from tests.test_utils.compat import AIRFLOW_V_2_9_PLUS from tests.test_utils.config import conf_vars from tests.test_utils.db import clear_db_pools from tests.test_utils.decorators import dont_initialize_flask_app_submodules @@ -41,7 +42,13 @@ def google_openid_app(): ) def factory(): with conf_vars( - {("api", "auth_backends"): "airflow.providers.google.common.auth_backend.google_openid"} + { + ("api", "auth_backends"): "airflow.providers.google.common.auth_backend.google_openid", + ( + "core", + "auth_manager", + ): "airflow.providers.fab.auth_manager.fab_auth_manager.FabAuthManager", + } ): _app = create_app(testing=True, config={"WTF_CSRF_ENABLED": False}) # type:ignore _app.config["AUTH_ROLE_PUBLIC"] = None @@ -67,6 +74,7 @@ def admin_user(google_openid_app): return role_admin +@pytest.mark.skipif(not AIRFLOW_V_2_9_PLUS, reason="The tests should be skipped for Airflow < 2.9") @pytest.mark.skip_if_database_isolation_mode @pytest.mark.db_test class TestGoogleOpenID: