Skip to content

Commit

Permalink
Remove deprecated mod_aws_sns
Browse files Browse the repository at this point in the history
- It was deprecated for more than 4 years
- All functionality is provided by mod_event_pusher now
  • Loading branch information
chrzaszcz committed Mar 23, 2022
1 parent bda07f6 commit 8c710ae
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 44 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-module(mod_aws_sns_SUITE).
-module(mod_event_pusher_sns_SUITE).
-compile([export_all, nowarn_export_all]).
-include_lib("escalus/include/escalus.hrl").
-include_lib("common_test/include/ct.hrl").
Expand Down Expand Up @@ -87,9 +87,12 @@ init_per_group(_, Config0) ->
Domain = domain(),
Config1 = dynamic_modules:save_modules(Domain, Config0),
Config = [{sns_config, ?SNS_OPTS} | Config1],
dynamic_modules:ensure_modules(Domain, [{mod_aws_sns, ?SNS_OPTS}]),
dynamic_modules:ensure_modules(Domain, required_modules()),
Config.

required_modules() ->
[{mod_event_pusher, [{backends, [{sns, ?SNS_OPTS}]}]}].

end_per_group(_, Config) ->
dynamic_modules:restore_modules(Config),
escalus:delete_users(Config, escalus:get_users([bob, alice])).
Expand Down
39 changes: 0 additions & 39 deletions src/mod_aws_sns.erl

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-module(mod_aws_sns_SUITE).
-module(event_pusher_sns_SUITE).

-compile([export_all, nowarn_export_all]).

Expand Down Expand Up @@ -134,7 +134,7 @@ end_per_suite(_) ->

init_per_testcase(_, Config) ->
meck:new([gen_mod, erlcloud_sns, mongoose_wpool], [non_strict, passthrough]),
meck:expect(erlcloud_sns, new, fun(_, _, _) -> mod_aws_sns_SUITE_erlcloud_sns_new end),
meck:expect(erlcloud_sns, new, fun(_, _, _) -> mod_event_pusher_sns_SUITE_erlcloud_sns_new end),
set_sns_config(#{}),
meck:expect(mongoose_wpool, cast, fun(_, _, _, {M, F, A}) -> erlang:apply(M, F, A) end),
[{sender, jid:from_binary(<<"sender@localhost">>)},
Expand Down Expand Up @@ -169,7 +169,7 @@ user_not_present_callback(Config) ->
%% Helpers

custom_callback_module(UserId, Attributes) ->
Module = mod_aws_sns_SUITE_mockcb,
Module = mod_event_pusher_sns_SUITE_mockcb,
set_sns_config(#{plugin_module => Module}),
meck:new(Module, [non_strict]),
meck:expect(Module, user_guid, fun(_) -> UserId end),
Expand Down

0 comments on commit 8c710ae

Please sign in to comment.