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

jscheffl 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 5d56a73c7b Fix main. Disable sync role in FAB auth manager tests 
(#42283)
5d56a73c7b is described below

commit 5d56a73c7baadbbbcebda4329f5d4638634bafd3
Author: Vincent <[email protected]>
AuthorDate: Tue Sep 17 21:33:13 2024 -0700

    Fix main. Disable sync role in FAB auth manager tests (#42283)
---
 .../fab/auth_manager/cli_commands/test_role_command.py       | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/tests/providers/fab/auth_manager/cli_commands/test_role_command.py 
b/tests/providers/fab/auth_manager/cli_commands/test_role_command.py
index 9c9be088e8..5f12c01860 100644
--- a/tests/providers/fab/auth_manager/cli_commands/test_role_command.py
+++ b/tests/providers/fab/auth_manager/cli_commands/test_role_command.py
@@ -26,6 +26,7 @@ import pytest
 
 from airflow.cli import cli_parser
 from tests.test_utils.compat import ignore_provider_compatibility_error
+from tests.test_utils.config import conf_vars
 
 with ignore_provider_compatibility_error("2.9.0+", __file__):
     from airflow.providers.fab.auth_manager.cli_commands import role_command
@@ -47,11 +48,12 @@ class TestCliRoles:
     @pytest.fixture(autouse=True)
     def _set_attrs(self):
         self.parser = cli_parser.get_parser()
-        with get_application_builder() as appbuilder:
-            self.appbuilder = appbuilder
-            self.clear_users_and_roles()
-            yield
-            self.clear_users_and_roles()
+        with conf_vars({("fab", "UPDATE_FAB_PERMS"): "False"}):
+            with get_application_builder() as appbuilder:
+                self.appbuilder = appbuilder
+                self.clear_users_and_roles()
+                yield
+                self.clear_users_and_roles()
 
     def clear_users_and_roles(self):
         session = self.appbuilder.get_session

Reply via email to