diff options
author | Loïc Hoguin <[email protected]> | 2018-10-31 10:50:57 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2018-10-31 10:50:57 +0100 |
commit | a8335c63df31f21d88e9d7d1f2b64d32a674cd7a (patch) | |
tree | 2c8adc564263b49621ed969e0e08976258a35ffa /test/old_http_SUITE.erl | |
parent | 07078eb47bfc2a774e4ce00d2a215c301f4f4ea7 (diff) | |
download | cowboy-a8335c63df31f21d88e9d7d1f2b64d32a674cd7a.tar.gz cowboy-a8335c63df31f21d88e9d7d1f2b64d32a674cd7a.tar.bz2 cowboy-a8335c63df31f21d88e9d7d1f2b64d32a674cd7a.zip |
Always dialyze tests and fix some cowboy_req specs
Diffstat (limited to 'test/old_http_SUITE.erl')
-rw-r--r-- | test/old_http_SUITE.erl | 8 |
1 files changed, 4 insertions, 4 deletions
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. |