Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:25
erlang
3732-inets-fix-httpd_serve_SUITE-on-Windows.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 3732-inets-fix-httpd_serve_SUITE-on-Windows.patch of Package erlang
From 83710ecb84defa40da4891da2e63240fb5d328c3 Mon Sep 17 00:00:00 2001 From: Jakub Witczak <kuba@erlang.org> Date: Tue, 24 Oct 2023 13:38:49 +0200 Subject: [PATCH] inets: fix httpd_serve_SUITE on Windows - follow-up of PR-7299 --- lib/inets/test/httpd_serve_SUITE.erl | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/inets/test/httpd_serve_SUITE.erl b/lib/inets/test/httpd_serve_SUITE.erl index c49391c35c..64890fdda0 100644 --- a/lib/inets/test/httpd_serve_SUITE.erl +++ b/lib/inets/test/httpd_serve_SUITE.erl @@ -86,7 +86,8 @@ run_server_assertions(Response) -> run_server_assertions(Response, ?DEFAULT_ASSERTIONS). %% Assert that the server responds properly. -run_server_assertions({ok, {Ip, Port, Path}}, Assertions) when is_integer(Port) -> +run_server_assertions({ok, {Ip0, Port, Path}}, Assertions) when is_integer(Port) -> + Ip = maybe_convert_to_localhost(Ip0), % From the `filelib:wildcard/1` docs: % "Directory separators must always be written as /, even on Windows." IpToRequest = case Ip of @@ -104,6 +105,14 @@ run_server_assertions({ok, {Ip, Port, Path}}, Assertions) when is_integer(Port) ok = verify_assertions(Assertions, ServerInfo), ct:comment("Ran ~w assertion(s).", [length(Assertions)]). +maybe_convert_to_localhost(Ip = {0, 0, 0, 0}) -> + case os:type() of + {win32, _} -> {127, 0, 0, 1}; + _ -> Ip + end; +maybe_convert_to_localhost(Ip) -> + Ip. + %% %% Assertion helper functions %% -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor