mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 12:20:24 +00:00
Add the static_handler test suite
This commit is contained in:
parent
f14c45151d
commit
e291c3bb94
2 changed files with 776 additions and 4 deletions
|
@ -42,22 +42,33 @@ common_all() ->
|
|||
[
|
||||
{group, http},
|
||||
{group, https},
|
||||
{group, http_compress},
|
||||
{group, https_compress}
|
||||
{group, h2},
|
||||
{group, h2c}%,
|
||||
%% @todo
|
||||
% {group, http_compress},
|
||||
% {group, https_compress}
|
||||
].
|
||||
|
||||
common_groups(Tests) ->
|
||||
[
|
||||
{http, [parallel], Tests},
|
||||
{https, [parallel], Tests},
|
||||
{http_compress, [parallel], Tests},
|
||||
{https_compress, [parallel], Tests}
|
||||
{h2, [parallel], Tests},
|
||||
{h2c, [parallel], Tests}%,
|
||||
%% @todo
|
||||
% {http_compress, [parallel], Tests},
|
||||
% {https_compress, [parallel], Tests}
|
||||
].
|
||||
|
||||
init_common_groups(Name = http, Config, Mod) ->
|
||||
init_http(Name, #{env => #{dispatch => Mod:init_dispatch(Config)}}, Config);
|
||||
init_common_groups(Name = https, Config, Mod) ->
|
||||
init_https(Name, #{env => #{dispatch => Mod:init_dispatch(Config)}}, Config);
|
||||
init_common_groups(Name = h2, Config, Mod) ->
|
||||
init_http2(Name, #{env => #{dispatch => Mod:init_dispatch(Config)}}, Config);
|
||||
init_common_groups(Name = h2c, Config, Mod) ->
|
||||
Config1 = init_http(Name, #{env => #{dispatch => Mod:init_dispatch(Config)}}, Config),
|
||||
lists:keyreplace(protocol, 1, Config1, {protocol, http2});
|
||||
init_common_groups(Name = http_compress, Config, Mod) ->
|
||||
init_http(Name, #{
|
||||
env => #{dispatch => Mod:init_dispatch(Config)},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue