aboutsummaryrefslogtreecommitdiffstats
path: root/lib/eldap/test/eldap_basic_SUITE.erl
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2014-12-17 10:37:43 +0100
committerHans Nilsson <[email protected]>2014-12-17 11:56:33 +0100
commit076c58c56d1970fe07e59d14e4dd7dd47496ec7f (patch)
tree0cf9666287cda7a5add2db0260af0555a21b8a77 /lib/eldap/test/eldap_basic_SUITE.erl
parentb6b91e0c32f9cf3060453d05727c687722c02e38 (diff)
downloadotp-076c58c56d1970fe07e59d14e4dd7dd47496ec7f.tar.gz
otp-076c58c56d1970fe07e59d14e4dd7dd47496ec7f.tar.bz2
otp-076c58c56d1970fe07e59d14e4dd7dd47496ec7f.zip
eldap: updated eldap:close in tests
Diffstat (limited to 'lib/eldap/test/eldap_basic_SUITE.erl')
-rw-r--r--lib/eldap/test/eldap_basic_SUITE.erl20
1 files changed, 9 insertions, 11 deletions
diff --git a/lib/eldap/test/eldap_basic_SUITE.erl b/lib/eldap/test/eldap_basic_SUITE.erl
index 806048258f..b6b618fcde 100644
--- a/lib/eldap/test/eldap_basic_SUITE.erl
+++ b/lib/eldap/test/eldap_basic_SUITE.erl
@@ -673,16 +673,14 @@ modify_dn_keep_old(Config) ->
start_tls_twice_should_fail(Config) ->
{ok,H} = open_bind(Config),
{error,tls_already_started} = eldap:start_tls(H, []),
- _Ok = eldap:close(H),
- ok.
+ eldap:close(H).
%%%----------------------------------------------------------------
%%% Test that start_tls on an ldaps connection fails
start_tls_on_ssl_should_fail(Config) ->
{ok,H} = open_bind(Config),
{error,tls_already_started} = eldap:start_tls(H, []),
- _Ok = eldap:close(H),
- ok.
+ eldap:close(H).
%%%----------------------------------------------------------------
encode(_Config) ->
@@ -744,16 +742,16 @@ find_first_server(UseSSL, [{Host,Port}|Ss]) ->
case eldap:start_tls(H,[]) of
ok ->
ct:log("find_first_server ~p UseSSL=~p -> ok",[{Host,Port},UseSSL]),
- _Ok = eldap:close(H),
+ eldap:close(H),
{Host,Port};
Res ->
ct:log("find_first_server ~p UseSSL=~p failed with~n~p~nSave as spare host.",[{Host,Port},UseSSL,Res]),
- _Ok = eldap:close(H),
+ eldap:close(H),
find_first_server(UseSSL, Ss++[{spare_host,Host,Port}])
end;
{ok,H} ->
ct:log("find_first_server ~p UseSSL=~p -> ok",[{Host,Port},UseSSL]),
- _Ok = eldap:close(H),
+ eldap:close(H),
{Host,Port};
Res ->
ct:log("find_first_server ~p UseSSL=~p failed with~n~p",[{Host,Port},UseSSL,Res]),
@@ -772,7 +770,7 @@ initialize_db(Config) ->
Path = "dc="++MyHost++",dc=ericsson,dc=se",
delete_old_contents(H, Path),
add_new_contents(H, Path, MyHost),
- _Ok = eldap:close(H),
+ eldap:close(H),
[{eldap_path,Path}|Config];
Other ->
ct:fail("initialize_db failed: ~p",[Other])
@@ -782,7 +780,7 @@ clear_db(Config) ->
{ok,H} = open_bind(Config),
Path = ?config(eldap_path, Config),
delete_old_contents(H, Path),
- _Ok = eldap:close(H),
+ eldap:close(H),
Config.
delete_old_contents(H, Path) ->
@@ -852,13 +850,13 @@ supported_extension(OID, Config) ->
{deref, eldap:neverDerefAliases()},
{attributes, ["+"]}]) of
{ok,R=#eldap_search_result{}} ->
- _Ok = eldap:close(H),
+ eldap:close(H),
lists:member(OID,
[SE || EE <- R#eldap_search_result.entries,
{"supportedExtension",SEs} <- EE#eldap_entry.attributes,
SE<-SEs]);
_ ->
- _Ok = eldap:close(H),
+ eldap:close(H),
false
end.