0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 12:20:24 +00:00

Fix the remaining http_SUITE test cases

This commit is contained in:
Loïc Hoguin 2017-07-14 19:09:42 +02:00
parent 23fcfe9eea
commit 7d9f6611ae
No known key found for this signature in database
GPG key ID: 71366FF21851DF03
3 changed files with 16 additions and 16 deletions

View file

@ -82,17 +82,17 @@ init_per_group(parse_host, Config) ->
{"/req_attr", http_req_attr, []}
]}
]),
{ok, _} = cowboy:start_clear(parse_host, [{port, 0}], [
{env, [{dispatch, Dispatch}]}
]),
{ok, _} = cowboy:start_clear(parse_host, [{port, 0}], #{
env => #{dispatch => Dispatch}
}),
Port = ranch:get_port(parse_host),
[{type, tcp}, {port, Port}, {opts, []}|Config];
[{type, tcp}, {protocol, http}, {port, Port}, {opts, []}|Config];
init_per_group(set_env, Config) ->
{ok, _} = cowboy:start_clear(set_env, [{port, 0}], [
{env, [{dispatch, []}]}
]),
{ok, _} = cowboy:start_clear(set_env, [{port, 0}], #{
env => #{dispatch => []}
}),
Port = ranch:get_port(set_env),
[{type, tcp}, {port, Port}, {opts, []}|Config].
[{type, tcp}, {protocol, http}, {port, Port}, {opts, []}|Config].
end_per_group(Name, _) ->
ok = cowboy:stop_listener(Name).
@ -286,7 +286,7 @@ echo_body_qs(Config) ->
echo_body_qs_max_length(Config) ->
ConnPid = gun_open(Config),
Ref = gun:post(ConnPid, "/echo/body_qs", [], << "echo=", 0:2000000/unit:8 >>),
Ref = gun:post(ConnPid, "/echo/body_qs", [], << "echo=", 0:4000000/unit:8 >>),
{response, nofin, 413, _} = gun:await(ConnPid, Ref),
ok.