diff options
author | Loïc Hoguin <[email protected]> | 2016-06-06 17:41:26 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2016-06-06 17:41:26 +0200 |
commit | e291c3bb940a00cc037a88aee981f8b7df1a7f42 (patch) | |
tree | 0019eb37a450ede7775ca5bd53df9f4f9c420cae /test/cowboy_test.erl | |
parent | f14c45151d786058bd774b4cf5ccd0f3e1ee2a08 (diff) | |
download | cowboy-e291c3bb940a00cc037a88aee981f8b7df1a7f42.tar.gz cowboy-e291c3bb940a00cc037a88aee981f8b7df1a7f42.tar.bz2 cowboy-e291c3bb940a00cc037a88aee981f8b7df1a7f42.zip |
Add the static_handler test suite
Diffstat (limited to 'test/cowboy_test.erl')
-rw-r--r-- | test/cowboy_test.erl | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/test/cowboy_test.erl b/test/cowboy_test.erl index 44ffdf8..5b223d1 100644 --- a/test/cowboy_test.erl +++ b/test/cowboy_test.erl @@ -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)}, |