aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2017-11-16 23:44:40 +0100
committerLoïc Hoguin <[email protected]>2017-11-16 23:44:40 +0100
commit729a23f9255db50550bb488c13903ee891f7a1b1 (patch)
tree0da0742a79eed9632cf2e835439dbd08de56524b
parent6ba605a5cad7ab1a2b07aa9779d1aa965a3e6560 (diff)
downloadranch-729a23f9255db50550bb488c13903ee891f7a1b1.tar.gz
ranch-729a23f9255db50550bb488c13903ee891f7a1b1.tar.bz2
ranch-729a23f9255db50550bb488c13903ee891f7a1b1.zip
Disable eacces tests on Windows
Windows apparently does not have privileged ports, anyone can open sockets on ports < 1024.
-rw-r--r--test/acceptor_SUITE.erl33
1 files changed, 21 insertions, 12 deletions
diff --git a/test/acceptor_SUITE.erl b/test/acceptor_SUITE.erl
index 2ef845d..7ef36b6 100644
--- a/test/acceptor_SUITE.erl
+++ b/test/acceptor_SUITE.erl
@@ -282,12 +282,17 @@ ssl_error_no_cert(_) ->
ok.
ssl_error_eacces(_) ->
- doc("Ensure that failure due to an eacces returns a compact readable error."),
- Name = name(),
- Opts = ct_helper:get_certs_from_ets(),
- {error, eacces} = ranch:start_listener(Name,
- ranch_ssl, [{port, 283}|Opts], active_echo_protocol, []),
- ok.
+ case os:type() of
+ {win32, nt} ->
+ doc("There are no privileged ports on Windows.");
+ _ ->
+ doc("Ensure that failure due to an eacces returns a compact readable error."),
+ Name = name(),
+ Opts = ct_helper:get_certs_from_ets(),
+ {error, eacces} = ranch:start_listener(Name,
+ ranch_ssl, [{port, 283}|Opts], active_echo_protocol, []),
+ ok
+ end.
%% tcp.
@@ -493,12 +498,16 @@ tcp_error_eaddrinuse(_) ->
ok.
tcp_error_eacces(_) ->
- doc("Ensure that failure due to an eacces returns a compact readable error."),
- Name = name(),
- {error, eacces} = ranch:start_listener(Name,
- ranch_tcp, [{port, 283}], active_echo_protocol, []),
- ok.
-
+ case os:type() of
+ {win32, nt} ->
+ doc("There are no privileged ports on Windows.");
+ _ ->
+ doc("Ensure that failure due to an eacces returns a compact readable error."),
+ Name = name(),
+ {error, eacces} = ranch:start_listener(Name,
+ ranch_tcp, [{port, 283}], active_echo_protocol, []),
+ ok
+ end.
%% Supervisor tests