Dev-iL commented on code in PR #73414:
URL: https://github.com/apache/airflow/pull/73414#discussion_r4185521246


##########
airflow-core/tests/unit/api_fastapi/execution_api/test_app.py:
##########
@@ -355,16 +446,24 @@ def _build_app(mode: str):
         [
             pytest.param("unsafe-always", "/health", False, True, 200, 
id="always-unauthenticated"),
             pytest.param("unsafe-always", "/variables/k", False, True, 401, 
id="always-auth-failure"),
-            pytest.param("unsafe-always", "/variables/k", True, True, None, 
id="always-authenticated"),
+            pytest.param("unsafe-always", "/variables/k", True, True, 200, 
id="always-authenticated"),
             pytest.param("only-authenticated", "/health", False, False, 200, 
id="onlyauth-unauthenticated"),
             pytest.param("only-authenticated", "/variables/k", False, False, 
401, id="onlyauth-auth-failure"),
-            pytest.param("only-authenticated", "/variables/k", True, True, 
None, id="onlyauth-authenticated"),
+            pytest.param("only-authenticated", "/variables/k", True, True, 
200, id="onlyauth-authenticated"),
             pytest.param("never", "/health", False, False, 200, 
id="never-unauthenticated"),
             pytest.param("never", "/variables/k", False, False, 401, 
id="never-auth-failure"),
-            pytest.param("never", "/variables/k", True, False, None, 
id="never-authenticated"),
+            pytest.param("never", "/variables/k", True, False, 200, 
id="never-authenticated"),

Review Comment:
   This doesn't change the return codes of endpoints.
   
   Previously, `expect_status=None` meant “skip the status assertion”. The test 
now mocks the resolver to return `"value"`, making successful requests 
deterministically return `200`.
   
   This adapts the trace-context test to async resolution and keeps it from 
opening database connections with an unmanaged engine lifetime. It **doesn’t 
fix an existing endpoint-status bug**.
   
   The route contract remains unchanged: success `200`, unauthenticated `401`, 
denied `403`, missing Variable `404`



-- 
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]

Reply via email to