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 65cc2ff
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 45 deletions.
2 changes: 1 addition & 1 deletion big_tests/default.spec
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
{suites, "tests", metrics_register_SUITE}.
{suites, "tests", metrics_roster_SUITE}.
{suites, "tests", metrics_session_SUITE}.
{suites, "tests", mod_aws_sns_SUITE}.
{suites, "tests", mod_blocking_SUITE}.
{suites, "tests", mod_event_pusher_rabbit_SUITE}.
{suites, "tests", mod_event_pusher_http_SUITE}.
{suites, "tests", mod_event_pusher_sns_SUITE}.
{suites, "tests", mod_global_distrib_SUITE}.
{suites, "tests", mod_http_upload_SUITE}.
{suites, "tests", mod_ping_SUITE}.
Expand Down
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(_, _, _) -> 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 = 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 65cc2ff

Please sign in to comment.