diff options
author | Fredrik Gustafsson <[email protected]> | 2013-11-07 16:40:18 +0100 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2014-02-05 10:32:25 +0100 |
commit | c500946862bbad092367799428b2658bf7f82861 (patch) | |
tree | 44a9c926febaf74d5e1c232c24d0b71d61d1b686 /lib/inets/test | |
parent | 021ede611d20f60e64936763048c271986bb2997 (diff) | |
download | otp-c500946862bbad092367799428b2658bf7f82861.tar.gz otp-c500946862bbad092367799428b2658bf7f82861.tar.bz2 otp-c500946862bbad092367799428b2658bf7f82861.zip |
[eldap, inets]: fix testcases when ssl not is present
Conflicts:
lib/eldap/test/eldap_basic_SUITE.erl
Diffstat (limited to 'lib/inets/test')
-rw-r--r-- | lib/inets/test/httpc_SUITE.erl | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/lib/inets/test/httpc_SUITE.erl b/lib/inets/test/httpc_SUITE.erl index c5a9b6168e..50025b1d9d 100644 --- a/lib/inets/test/httpc_SUITE.erl +++ b/lib/inets/test/httpc_SUITE.erl @@ -145,6 +145,22 @@ init_per_group(misc = Group, Config) -> ok = httpc:set_options([{ipfamily, Inet}]), Config; +init_per_group(Group, Config0) when Group =:= sim_https; Group =:= https-> + start_apps(Group), + StartSsl = try ssl:start() + catch + Error:Reason -> + {skip, lists:flatten(io_lib:format("Failed to start apps for https Error=~p Reason=~p", [Error, Reason]))} + end, + case StartSsl of + {error, {already_started, _}} -> + do_init_per_group(Group, Config0); + ok -> + do_init_per_group(Group, Config0); + _ -> + StartSsl + end; + init_per_group(Group, Config0) -> start_apps(Group), Config = proplists:delete(port, Config0), @@ -153,7 +169,10 @@ init_per_group(Group, Config0) -> end_per_group(_, _Config) -> ok. - +do_init_per_group(Group, Config0) -> + Config = proplists:delete(port, Config0), + Port = server_start(Group, server_config(Group, Config)), + [{port, Port} | Config]. %%-------------------------------------------------------------------- init_per_testcase(pipeline, Config) -> inets:start(httpc, [{profile, pipeline}]), @@ -1069,6 +1088,8 @@ server_config(_, _) -> start_apps(https) -> inets_test_lib:start_apps([crypto, public_key, ssl]); +start_apps(sim_https) -> + inets_test_lib:start_apps([crypto, public_key, ssl]); start_apps(_) -> ok. |