Skip to content

Commit

Permalink
Merge pull request #4202 from esl/mam-disco-barejid-changes
Browse files Browse the repository at this point in the history
Mam disco barejid changes
  • Loading branch information
chrzaszcz authored Jan 3, 2024
2 parents 112e3a6 + c1828ec commit 41856a7
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions big_tests/tests/mam_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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]}]}
Expand All @@ -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,
Expand Down Expand Up @@ -2852,7 +2856,6 @@ after_complete_true_after11(Config) ->
%% ------------------------------------------------------------------

prefs_set_request(Config) ->
_P = ?config(props, Config),
F = fun(Alice) ->
%% Send
%%
Expand Down Expand Up @@ -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
%%
Expand Down Expand Up @@ -2932,24 +2934,30 @@ 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)
end,
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),
Expand Down Expand Up @@ -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()]
Expand Down

0 comments on commit 41856a7

Please sign in to comment.