Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Perform fuzzing and replay using localhost instead of 127.0.0.1 #374

Merged
merged 1 commit into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion grizzly/common/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def location(
Returns:
str: A valid URL.
"""
location = f"{scheme}://127.0.0.1:{srv_port}/{srv_path.lstrip('/')}"
location = f"{scheme}://localhost:{srv_port}/{srv_path.lstrip('/')}"
# set harness related arguments
args = []
if close_after is not None:
Expand Down
12 changes: 6 additions & 6 deletions grizzly/common/test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,17 +261,17 @@ def test_runner_07(mocker):
def test_runner_08():
"""test Runner.location()"""
result = Runner.location("a.html", 34567)
assert result == "http://127.0.0.1:34567/a.html"
assert result == "http://localhost:34567/a.html"
result = Runner.location("/a.html", 34567)
assert result == "http://127.0.0.1:34567/a.html"
assert result == "http://localhost:34567/a.html"
result = Runner.location("a.html", 34567, close_after=10)
assert result == "http://127.0.0.1:34567/a.html?close_after=10"
assert result == "http://localhost:34567/a.html?close_after=10"
result = Runner.location("a.html", 9999, time_limit=60)
assert result == "http://127.0.0.1:9999/a.html?time_limit=60000"
assert result == "http://localhost:9999/a.html?time_limit=60000"
result = Runner.location("a.html", 9999, close_after=10, time_limit=60)
assert result == "http://127.0.0.1:9999/a.html?close_after=10&time_limit=60000"
assert result == "http://localhost:9999/a.html?close_after=10&time_limit=60000"
result = Runner.location("a.html", 9999, post_launch_delay=10)
assert result == "http://127.0.0.1:9999/a.html?post_launch_delay=10"
assert result == "http://localhost:9999/a.html?post_launch_delay=10"


def test_runner_09(mocker):
Expand Down
Loading