You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by po...@apache.org on 2024/02/19 17:00:26 UTC

(airflow) branch main updated: Fix failing home view test after changing audit log permissions (#37550)

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 016892b7d6 Fix failing home view test after changing audit log permissions (#37550)
016892b7d6 is described below

commit 016892b7d6bc654ac3ff7e4f8f9f7231f835bed7
Author: Jarek Potiuk <ja...@potiuk.com>
AuthorDate: Mon Feb 19 18:00:20 2024 +0100

    Fix failing home view test after changing audit log permissions (#37550)
    
    Yet another test was failing after changing audit log permissions
    in #37501
---
 tests/www/views/test_views_home.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/tests/www/views/test_views_home.py b/tests/www/views/test_views_home.py
index c89ab89e9b..c9b17adf75 100644
--- a/tests/www/views/test_views_home.py
+++ b/tests/www/views/test_views_home.py
@@ -375,11 +375,16 @@ def test_dashboard_flash_messages_type(user_client):
     check_content_in_response("alert-foo", resp)
 
 
-def test_audit_log_view(user_client, working_dags):
-    resp = user_client.get("/dags/filter_test_1/audit_log")
+def test_audit_log_view_admin(admin_client, working_dags):
+    resp = admin_client.get("/dags/filter_test_1/audit_log")
     check_content_in_response("Dag Audit Log", resp)
 
 
+def test_audit_log_view_user(user_client, working_dags):
+    resp = user_client.get("/dags/filter_test_1/audit_log")
+    check_content_not_in_response("Dag Audit Log", resp, resp_code=302)
+
+
 @pytest.mark.parametrize(
     "url, lower_key, greater_key",
     [