aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/test/diameter_app_SUITE.erl
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2011-10-04 18:06:53 +0200
committerAnders Svensson <[email protected]>2011-10-06 16:29:47 +0200
commitc002a636022d9910288a8612d03c6edd5c1a6962 (patch)
tree134a5901f56fa198366007ce98452b39dd17abeb /lib/diameter/test/diameter_app_SUITE.erl
parent82934adca7cd26777025bc9ae1b87b45d2a55fe2 (diff)
downloadotp-c002a636022d9910288a8612d03c6edd5c1a6962.tar.gz
otp-c002a636022d9910288a8612d03c6edd5c1a6962.tar.bz2
otp-c002a636022d9910288a8612d03c6edd5c1a6962.zip
Clarify that ssl must be started for TLS support
Also update app testsuite to allow for "undefined" calls from diameter_tcp to ssl.
Diffstat (limited to 'lib/diameter/test/diameter_app_SUITE.erl')
-rw-r--r--lib/diameter/test/diameter_app_SUITE.erl18
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/diameter/test/diameter_app_SUITE.erl b/lib/diameter/test/diameter_app_SUITE.erl
index 104785b4e6..15a98d4441 100644
--- a/lib/diameter/test/diameter_app_SUITE.erl
+++ b/lib/diameter/test/diameter_app_SUITE.erl
@@ -147,14 +147,13 @@ appvsn(Name) ->
%% ===========================================================================
%% # xref/1
%%
-%% Ensure that no function in our application calls an undefined function.
+%% Ensure that no function in our application calls an undefined function
+%% or one in an application we haven't specified as a dependency. (Almost.)
%% ===========================================================================
xref(Config) ->
App = fetch(app, Config),
- Mods = fetch(modules, App) -- [diameter_codegen, diameter_dbg],
- %% Skip modules that aren't required at runtime and that have
- %% dependencies beyond those applications listed in the app file.
+ Mods = fetch(modules, App),
{ok, XRef} = xref:start(make_name(xref_test_name)),
ok = xref:set_default(XRef, [{verbose, false}, {warnings, false}]),
@@ -164,7 +163,10 @@ xref(Config) ->
%% stop xref from complaining about calls to module erlang, which
%% was previously in kernel. Erts isn't an application however, in
%% the sense that there's no .app file, and isn't listed in
- %% applications. Seems less than ideal.
+ %% applications. Seems less than ideal. Also, diameter_tcp does
+ %% call ssl despite ssl not being listed as a dependency in the
+ %% app file since ssl is only required for TLS security: it's up
+ %% to a client who wants TLS it to start ssl.
ok = lists:foreach(fun(A) -> add_application(XRef, A) end,
[?APP, erts | fetch(applications, App)]),
@@ -173,7 +175,11 @@ xref(Config) ->
xref:stop(XRef),
%% Only care about calls from our own application.
- [] = lists:filter(fun({{M,_,_},_}) -> lists:member(M, Mods) end, Undefs).
+ [] = lists:filter(fun({{F,_,_},{T,_,_}}) ->
+ lists:member(F, Mods)
+ andalso {F,T} /= {diameter_tcp, ssl}
+ end,
+ Undefs).
add_application(XRef, App) ->
add_application(XRef, App, code:lib_dir(App)).