diff options
author | Loïc Hoguin <[email protected]> | 2018-05-17 21:04:40 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2018-05-17 21:04:40 +0200 |
commit | 753ba2e36d345f960edc4be486238a684c467574 (patch) | |
tree | 12c9fa1551adca6f2e900df908157c4d519d1b41 /test/old_http_SUITE.erl | |
parent | 36b32194b74dbc55e12feaab265724ec864dccd2 (diff) | |
download | cowboy-753ba2e36d345f960edc4be486238a684c467574.tar.gz cowboy-753ba2e36d345f960edc4be486238a684c467574.tar.bz2 cowboy-753ba2e36d345f960edc4be486238a684c467574.zip |
Remove the set_env test from old_http_SUITE
It duplicated a test in misc_SUITE. Also fix a couple issues
in misc_SUITE including a test that was not being executed.
Diffstat (limited to 'test/old_http_SUITE.erl')
-rw-r--r-- | test/old_http_SUITE.erl | 31 |
1 files changed, 4 insertions, 27 deletions
diff --git a/test/old_http_SUITE.erl b/test/old_http_SUITE.erl index 260a47e..f1b88a4 100644 --- a/test/old_http_SUITE.erl +++ b/test/old_http_SUITE.erl @@ -33,22 +33,16 @@ all() -> {group, http}, {group, https}, {group, http_compress}, - {group, https_compress}, - {group, set_env} + {group, https_compress} ]. groups() -> - Tests = ct_helper:all(?MODULE) -- [ - set_env_dispatch - ], + Tests = ct_helper:all(?MODULE), [ {http, [], Tests}, %% @todo parallel {https, [parallel], Tests}, {http_compress, [parallel], Tests}, - {https_compress, [parallel], Tests}, - {set_env, [], [ - set_env_dispatch - ]} + {https_compress, [parallel], Tests} ]. init_per_group(Name = http, Config) -> @@ -64,13 +58,7 @@ init_per_group(Name = https_compress, Config) -> cowboy_test:init_https(Name, #{ env => #{dispatch => init_dispatch(Config)}, compress => true - }, Config); -init_per_group(set_env, Config) -> - {ok, _} = cowboy:start_clear(set_env, [{port, 0}], #{ - env => #{dispatch => []} - }), - Port = ranch:get_port(set_env), - [{type, tcp}, {protocol, http}, {port, Port}, {opts, []}|Config]. + }, Config). end_per_group(Name, _) -> ok = cowboy:stop_listener(Name). @@ -519,17 +507,6 @@ rest_resource_etags_if_none_match(Config) -> {Ret, Type} end || {Status, ETag, Type} <- Tests]. -set_env_dispatch(Config) -> - ConnPid1 = gun_open(Config), - Ref1 = gun:get(ConnPid1, "/"), - {response, fin, 400, _} = gun:await(ConnPid1, Ref1), - ok = cowboy:set_env(set_env, dispatch, - cowboy_router:compile([{'_', [{"/", http_handler, []}]}])), - ConnPid2 = gun_open(Config), - Ref2 = gun:get(ConnPid2, "/"), - {response, nofin, 200, _} = gun:await(ConnPid2, Ref2), - ok. - set_resp_overwrite(Config) -> ConnPid = gun_open(Config), Ref = gun:get(ConnPid, "/set_resp/overwrite"), |