Skip to content

Commit

Permalink
Remove check_carboncopy CT hook
Browse files Browse the repository at this point in the history
This hook is a leftover from when mod_carboncopy was using its own mnesia table.
See commit e0b1d9d when it was removed for
details. It is safe to remove this hook, as other hooks like `check_sessions`
or `check_registered_users` together with using escalus fresh stories should
already ensure that no user configuration leaks between the test groups.
  • Loading branch information
gustawlippa committed May 27, 2021
1 parent e55fa8e commit 8e05c72
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions big_tests/src/ct_mongoose_hook.erl
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,7 @@ do_check_server_purity(_Suite) ->
fun check_privacy/0,
fun check_private/0,
fun check_vcard/0,
fun check_roster/0,
fun check_carboncopy/0],
fun check_roster/0],
lists:flatmap(fun(F) -> F() end, Funs).

check_sessions() ->
Expand Down Expand Up @@ -187,28 +186,13 @@ check_vcard() ->
check_roster() ->
generic_via_mongoose_helper(total_roster_items).

check_carboncopy() ->
D = ct:get_config({hosts, mim, domain}),
case rpc(mim(), gen_mod, is_loaded, [D, mod_carboncopy]) of
true ->
do_check_carboncopy();
_ ->
[]
end.

generic_via_mongoose_helper(Function) ->
case mongoose_helper:Function() of
0 -> [];
false -> [];
N -> [{Function, N}]
end.

do_check_carboncopy() ->
case rpc(mim(), ets, tab2list, [carboncopy]) of
[] -> [];
L -> [{remaining_carbon_copy_settings, L}]
end.

mim_domains() ->
[ct:get_config({hosts, mim, domain}),
ct:get_config({hosts, mim, secondary_domain})].

0 comments on commit 8e05c72

Please sign in to comment.