fix(validation): expand validate_url edge case coverage#180
Open
HitanshiThakar wants to merge 3 commits into
Open
fix(validation): expand validate_url edge case coverage#180HitanshiThakar wants to merge 3 commits into
HitanshiThakar wants to merge 3 commits into
Conversation
utksh1
requested changes
May 22, 2026
Owner
utksh1
left a comment
There was a problem hiding this comment.
CI currently shows backend-tests failing. Please rebase on latest main and re-run CI; if failures persist, fix them.
After checks are green, I can re-review the URL validation coverage changes.
Author
|
Done, All checks have passed. |
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
Added additional validate_url test coverage in testing/backend/unit/test_validation.py for edge cases including:
localhost URLs with paths and query parameters
IP addresses with ports
invalid schemes
missing hosts
malformed ports
URLs containing spaces
While adding the tests, I found that malformed/out-of-range ports were being accepted as valid URLs. Added a small validation fix to reject invalid port values.
Related Issues
Closes #80
Type of Change
How Has This Been Tested?
python -m pytest testing/backend/unit/test_validation.py -v
Result:
6 tests passed
Checklist