[serve] Improve test_root_path in test_fastapi.py#60270
Merged
abrarsheikh merged 5 commits intoray-project:masterfrom Jan 26, 2026
Merged
[serve] Improve test_root_path in test_fastapi.py#60270abrarsheikh merged 5 commits intoray-project:masterfrom
abrarsheikh merged 5 commits intoray-project:masterfrom
Conversation
Signed-off-by: axreldable <aleksei.starikov.ax@gmail.com>
8 tasks
Contributor
There was a problem hiding this comment.
Code Review
The pull request significantly improves the test_root_path unit test by introducing more descriptive expected values and a comprehensive set of test URLs. The updated test logic now correctly verifies both root_path and path from the ASGI scope for various app_root_path and serve_root_path configurations, including handling different uvicorn versions. The detailed docstring with the explanation table is a great addition for understanding the test's intent and expected behaviors.
Signed-off-by: axreldable <aleksei.starikov.ax@gmail.com>
Signed-off-by: axreldable <aleksei.starikov.ax@gmail.com>
Signed-off-by: axreldable <aleksei.starikov.ax@gmail.com>
harshit-anyscale
approved these changes
Jan 26, 2026
abrarsheikh
approved these changes
Jan 26, 2026
4 tasks
jinbum-kim
pushed a commit
to jinbum-kim/ray
that referenced
this pull request
Jan 29, 2026
## Description Update the `test_root_path` unit test in the `test_fastapi.py`. The new implementation is more descriptive in the expected values of the request urls, ASGI scope["root_path"], and scope["path"] for different root_path configurations provided via the app and serve layers. ## Related issues Relates to the PR ray-project#57555 --------- Signed-off-by: axreldable <aleksei.starikov.ax@gmail.com> Signed-off-by: jinbum-kim <jinbum9958@gmail.com>
limarkdcunha
pushed a commit
to limarkdcunha/ray
that referenced
this pull request
Jan 29, 2026
## Description Update the `test_root_path` unit test in the `test_fastapi.py`. The new implementation is more descriptive in the expected values of the request urls, ASGI scope["root_path"], and scope["path"] for different root_path configurations provided via the app and serve layers. ## Related issues Relates to the PR ray-project#57555 --------- Signed-off-by: axreldable <aleksei.starikov.ax@gmail.com>
400Ping
pushed a commit
to 400Ping/ray
that referenced
this pull request
Feb 1, 2026
## Description Update the `test_root_path` unit test in the `test_fastapi.py`. The new implementation is more descriptive in the expected values of the request urls, ASGI scope["root_path"], and scope["path"] for different root_path configurations provided via the app and serve layers. ## Related issues Relates to the PR ray-project#57555 --------- Signed-off-by: axreldable <aleksei.starikov.ax@gmail.com> Signed-off-by: 400Ping <jiekaichang@apache.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Update the
test_root_pathunit test in thetest_fastapi.py.The new implementation is more descriptive in the expected values of the request urls, ASGI scope["root_path"], and scope["path"] for different root_path configurations provided via the app and serve layers.
Related issues
Relates to the PR #57555