From a8335c63df31f21d88e9d7d1f2b64d32a674cd7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Wed, 31 Oct 2018 10:50:57 +0100 Subject: Always dialyze tests and fix some cowboy_req specs --- test/old_http_SUITE.erl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/old_http_SUITE.erl') diff --git a/test/old_http_SUITE.erl b/test/old_http_SUITE.erl index 8e31ec1..affc3e7 100644 --- a/test/old_http_SUITE.erl +++ b/test/old_http_SUITE.erl @@ -181,7 +181,7 @@ http10_hostless(Config) -> tcp -> {ranch_tcp, cowboy_clear}; ssl -> {ranch_ssl, cowboy_tls} end, - ranch:start_listener(Name, 5, Transport, + {ok, _} = ranch:start_listener(Name, 5, Transport, config(opts, Config) ++ [{port, Port10}], Protocol, #{ env =>#{dispatch => cowboy_router:compile([ @@ -197,7 +197,7 @@ http10_keepalive_default(Config) -> Normal = "GET / HTTP/1.0\r\nhost: localhost\r\n\r\n", Client = raw_open(Config), ok = raw_send(Client, Normal), - case catch raw_recv_head(Client) of + _ = case catch raw_recv_head(Client) of {'EXIT', _} -> error(closed); Data -> %% Cowboy always advertises itself as HTTP/1.1. @@ -215,7 +215,7 @@ http10_keepalive_forced(Config) -> Keepalive = "GET / HTTP/1.0\r\nhost: localhost\r\nConnection: keep-alive\r\n\r\n", Client = raw_open(Config), ok = raw_send(Client, Keepalive), - case catch raw_recv_head(Client) of + _ = case catch raw_recv_head(Client) of {'EXIT', _} -> error(closed); Data -> %% Cowboy always advertises itself as HTTP/1.1. @@ -268,7 +268,7 @@ do_nc(Config, Input) -> _Good -> %% Throw garbage at the server then check if it's still up. StrPort = integer_to_list(config(port, Config)), - [os:cmd("cat " ++ Input ++ " | nc localhost " ++ StrPort) + _ = [os:cmd("cat " ++ Input ++ " | nc localhost " ++ StrPort) || _ <- lists:seq(1, 100)], 200 = do_get("/", Config) end. -- cgit v1.2.3