Skip to content

Commit

Permalink
Replace localhost to domain
Browse files Browse the repository at this point in the history
  • Loading branch information
vkatsuba committed Sep 20, 2021
1 parent 3437e53 commit c96af86
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 19 deletions.
20 changes: 11 additions & 9 deletions big_tests/tests/metrics_api_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

-include_lib("eunit/include/eunit.hrl").

-import(domain_helper, [host_type/1, domain/0]).

%%--------------------------------------------------------------------
%% Suite configuration
%%--------------------------------------------------------------------
Expand All @@ -48,12 +50,12 @@ all() ->

groups() ->
[
{metrics, [], ?METRICS_CASES},
{all_metrics_are_global, [], ?METRICS_CASES},
{global, [], [session_counters,
node_uptime,
cluster_size
]}
{metrics, [], ?METRICS_CASES},
{all_metrics_are_global, [], ?METRICS_CASES},
{global, [], [session_counters,
node_uptime,
cluster_size
]}
].

init_per_suite(Config) ->
Expand Down Expand Up @@ -167,7 +169,7 @@ one_message_error(Config) ->
(Config, metrics_helper:userspec(1, Config),
fun(User1) ->
Chat = escalus_stanza:chat_to
(<<"nobody@localhost">>, <<"Hi!">>),
(<<"nobody@", (domain())/binary>>, <<"Hi!">>),
escalus_client:send(User1, Chat),
escalus_client:wait_for_stanza(User1)
end,
Expand All @@ -194,7 +196,7 @@ one_presence_error(Config) ->
(Config, metrics_helper:userspec(1, Config),
fun(User1) ->
BadPres = escalus_stanza:presence_direct
(<<"localhost/no-such-resource">>, <<"subscribed">>, []),
(<<(domain())/binary, "/no-such-resource">>, <<"subscribed">>, []),
escalus_client:send(User1, BadPres),
escalus_client:wait_for_stanza(User1)
end,
Expand Down Expand Up @@ -384,7 +386,7 @@ find(CounterName, CounterList) ->
fetch_counter_value(Counter, _Config) ->
Metric = atom_to_binary(Counter, utf8),

HostType = domain_helper:host_type(mim),
HostType = host_type(mim),
HostTypeName = metrics_helper:make_host_type_name(HostType),

Result = simple_request(<<"GET">>,
Expand Down
10 changes: 5 additions & 5 deletions big_tests/tests/mod_aws_sns_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,15 @@ end_per_suite(Config) ->
escalus:end_per_suite(Config).

init_per_group(_, Config0) ->
Host = domain(),
Config1 = dynamic_modules:save_modules(Host, Config0),
Domain = domain(),
Config1 = dynamic_modules:save_modules(Domain, Config0),
Config = [{sns_config, ?SNS_OPTS} | Config1],
dynamic_modules:ensure_modules(Host, [{mod_aws_sns, ?SNS_OPTS}]),
dynamic_modules:ensure_modules(Domain, [{mod_aws_sns, ?SNS_OPTS}]),
Config.

end_per_group(_, Config) ->
Host = domain(),
dynamic_modules:restore_modules(Host, Config),
Domain = domain(),
dynamic_modules:restore_modules(Domain, Config),
escalus:delete_users(Config, escalus:get_users([bob, alice])).

init_per_testcase(muc_messages = C, Config0) ->
Expand Down
10 changes: 5 additions & 5 deletions big_tests/tests/vcard_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -898,8 +898,8 @@ search_open_limited(Config) ->
escalus:story(
Config, [{alice, 1}],
fun(Client) ->
Server = domain(),
DirJID = <<"directory.", Server/binary>>,
Domain = domain(),
DirJID = <<"directory.", Domain/binary>>,
Fields = [null],
Res = escalus:send_and_wait(Client,
escalus_stanza:search_iq(DirJID,
Expand Down Expand Up @@ -1069,12 +1069,12 @@ prepare_vcard(_, JID, Fields) ->

insert_alice_photo(Config) ->
User = <<"alice">>,
Server = domain(),
Base = get_ldap_base(Server),
Domain = domain(),
Base = get_ldap_base(Domain),
Photo = ?PHOTO_BIN,
Modificators = [eldap:mod_replace("jpegPhoto", [binary_to_list(Photo)])],
Dn = <<"cn=", User/binary, ",", Base/binary>>,
ok = call_ldap(Server, modify, [binary_to_list(Dn), Modificators]),
ok = call_ldap(Domain, modify, [binary_to_list(Dn), Modificators]),
Config.


Expand Down

0 comments on commit c96af86

Please sign in to comment.