diff --git a/big_tests/tests/mam_SUITE.erl b/big_tests/tests/mam_SUITE.erl index dd903e75399..0b3cfff9713 100644 --- a/big_tests/tests/mam_SUITE.erl +++ b/big_tests/tests/mam_SUITE.erl @@ -34,6 +34,7 @@ muc_only_stanzaid/1, mam_service_discovery/1, mam_service_discovery_to_client_bare_jid/1, + mam_service_discovery_to_different_client_bare_jid_results_in_error/1, muc_service_discovery/1, easy_archive_request/1, easy_archive_request_for_the_receiver/1, @@ -366,7 +367,9 @@ basic_groups() -> [{mam04, [parallel], chat_markers_cases()}]}, {disabled_retraction, [], [{mam06, [parallel], disabled_retract_cases() ++ - [mam_service_discovery, mam_service_discovery_to_client_bare_jid]}]}, + [mam_service_discovery, + mam_service_discovery_to_client_bare_jid, + mam_service_discovery_to_different_client_bare_jid_results_in_error]}]}, {muc_disabled_retraction, [], [{muc06, [parallel], disabled_muc_retract_cases() ++ [muc_service_discovery]}]} @@ -383,6 +386,7 @@ mam_metrics_cases() -> mam_cases() -> [mam_service_discovery, mam_service_discovery_to_client_bare_jid, + mam_service_discovery_to_different_client_bare_jid_results_in_error, easy_archive_request, easy_archive_request_for_the_receiver, message_sent_to_yourself, @@ -2852,7 +2856,6 @@ after_complete_true_after11(Config) -> %% ------------------------------------------------------------------ prefs_set_request(Config) -> - _P = ?config(props, Config), F = fun(Alice) -> %% Send %% @@ -2902,7 +2905,6 @@ query_get_request(Config) -> %% without whitespaces. In the real world it is not true. %% Put "\n" between two jid elements. prefs_set_cdata_request(Config) -> - _P = ?config(props, Config), F = fun(Alice) -> %% Send %% @@ -2932,7 +2934,6 @@ prefs_set_cdata_request(Config) -> escalus_fresh:story(Config, [{alice, 1}], F). mam_service_discovery(Config) -> - _P = ?config(props, Config), F = fun(Alice) -> Server = escalus_client:server(Alice), discover_features(Config, Alice, Server) @@ -2940,16 +2941,23 @@ mam_service_discovery(Config) -> escalus_fresh:story(Config, [{alice, 1}], F). mam_service_discovery_to_client_bare_jid(Config) -> - _P = ?config(props, Config), F = fun(Alice) -> Address = inbox_helper:to_bare_lower(Alice), discover_features(Config, Alice, Address) end, escalus_fresh:story(Config, [{alice, 1}], F). +mam_service_discovery_to_different_client_bare_jid_results_in_error(Config) -> + F = fun(Alice, Bob) -> + Address = inbox_helper:to_bare_lower(Bob), + escalus:send(Alice, escalus_stanza:disco_info(Address)), + Stanza = escalus:wait_for_stanza(Alice), + escalus:assert(is_error, [<<"cancel">>, <<"service-unavailable">>], Stanza) + end, + escalus_fresh:story(Config, [{alice, 1}, {bob, 1}], F). + %% Check, that MUC is supported. muc_service_discovery(Config) -> - _P = ?config(props, Config), F = fun(Alice) -> Domain = domain(), Server = escalus_client:server(Alice), @@ -3055,7 +3063,6 @@ run_prefs_cases(DefaultPolicy, ConfigIn) -> %% The same as prefs_set_request case but for different configurations run_set_and_get_prefs_cases(ConfigIn) -> - _P = ?config(props, ConfigIn), F = fun(Config, Alice, _Bob, _Kate) -> Namespace = mam_ns_binary_v04(), [run_set_and_get_prefs_case(Case, Namespace, Alice, Config) || Case <- prefs_cases2()]