Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test mongooseimctl with dynamic domains #3273

Merged
merged 8 commits into from
Sep 15, 2021

Conversation

chrzaszcz
Copy link
Member

@chrzaszcz chrzaszcz commented Sep 15, 2021

Enable the CLI tests for dynamic domains. Some bugs were discovered and fixed along the way:

  • There was a faulty check if mod_private was running (per domain, not per host type)
  • Total number of users was calculated only for static domains.
  • HTTP upload URLs were supposed to be created per domain, but the domain was interpreted as a host type.

Some tests were also skipped for RDBMS, but they shouldn't be.

Was for domain, should be for host type.
The previous code was working only for static ones.

Note: this code can be very heavy on some installations,
      we might want to emphasise this in the docs.
Also:
  - Do not skip some tests for RDBMS as the schema contains the server now
@chrzaszcz chrzaszcz force-pushed the test-mongooseimctl-with-dynamic-domains branch from 33992f5 to 73a5fe3 Compare September 15, 2021 12:24
@mongoose-im
Copy link
Collaborator

mongoose-im commented Sep 15, 2021

small_tests_24 / small_tests / 33992f5
Reports root / small


internal_mnesia_24 / internal_mnesia / 33992f5
Reports root/ big
OK: 1589 / Failed: 0 / User-skipped: 290 / Auto-skipped: 0

@codecov
Copy link

codecov bot commented Sep 15, 2021

Codecov Report

Merging #3273 (73a5fe3) into master (3141a15) will decrease coverage by 0.03%.
The diff coverage is 85.71%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3273      +/-   ##
==========================================
- Coverage   80.21%   80.17%   -0.04%     
==========================================
  Files         398      398              
  Lines       32560    32560              
==========================================
- Hits        26118    26106      -12     
- Misses       6442     6454      +12     
Impacted Files Coverage Δ
src/admin_extra/service_admin_extra_private.erl 83.33% <66.66%> (ø)
src/admin_extra/service_admin_extra_stats.erl 83.33% <100.00%> (-1.29%) ⬇️
src/admin_extra/service_admin_extra_upload.erl 93.75% <100.00%> (+0.41%) ⬆️
src/event_pusher/mod_event_pusher_sns.erl 84.21% <0.00%> (-5.27%) ⬇️
src/jingle_sip/mod_jingle_sip_backend.erl 80.00% <0.00%> (-5.00%) ⬇️
src/domain/mongoose_domain_sql.erl 82.85% <0.00%> (-2.86%) ⬇️
src/domain/mongoose_domain_loader.erl 77.35% <0.00%> (-1.89%) ⬇️
src/global_distrib/mod_global_distrib_receiver.erl 78.88% <0.00%> (-1.12%) ⬇️
src/auth/ejabberd_auth_rdbms.erl 56.32% <0.00%> (-0.64%) ⬇️
src/pubsub/mod_pubsub_db_mnesia.erl 92.43% <0.00%> (-0.43%) ⬇️
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3141a15...73a5fe3. Read the comment docs.

@mongoose-im
Copy link
Collaborator

mongoose-im commented Sep 15, 2021

small_tests_24 / small_tests / 73a5fe3
Reports root / small


internal_mnesia_24 / internal_mnesia / 73a5fe3
Reports root/ big
OK: 1589 / Failed: 0 / User-skipped: 290 / Auto-skipped: 0


small_tests_22 / small_tests / 73a5fe3
Reports root / small


dynamic_domains_24 / pgsql_mnesia / 73a5fe3
Reports root/ big
OK: 2384 / Failed: 0 / User-skipped: 131 / Auto-skipped: 0


small_tests_23 / small_tests / 73a5fe3
Reports root / small


ldap_mnesia_24 / ldap_mnesia / 73a5fe3
Reports root/ big
OK: 1486 / Failed: 0 / User-skipped: 393 / Auto-skipped: 0


dynamic_domains_23 / pgsql_mnesia / 73a5fe3
Reports root/ big
OK: 2384 / Failed: 0 / User-skipped: 131 / Auto-skipped: 0


ldap_mnesia_22 / ldap_mnesia / 73a5fe3
Reports root/ big
OK: 1486 / Failed: 0 / User-skipped: 393 / Auto-skipped: 0


elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / 73a5fe3
Reports root/ big
OK: 1862 / Failed: 0 / User-skipped: 316 / Auto-skipped: 0


ldap_mnesia_23 / ldap_mnesia / 73a5fe3
Reports root/ big
OK: 1486 / Failed: 0 / User-skipped: 393 / Auto-skipped: 0


pgsql_mnesia_22 / pgsql_mnesia / 73a5fe3
Reports root/ big
OK: 3082 / Failed: 1 / User-skipped: 211 / Auto-skipped: 0

jingle_SUITE:all:resp_4xx_from_sip_proxy_results_in_session_terminate
{error,
  {{assertion_failed,assert,is_iq_result,
     {xmlel,<<"iq">>,
       [{<<"from">>,<<"error.480@localhost">>},
        {<<"to">>,
         <<"alice_resp_4xx_from_sip_proxy_results_in_session_terminate_40.374447@localhost/res1">>},
        {<<"id">>,<<"040d9d93-85a1-4e22-ba01-de5a8e8f9569">>},
        {<<"type">>,<<"set">>}],
       [{xmlel,<<"jingle">>,
          [{<<"xmlns">>,<<"urn:xmpp:jingle:1">>},
           {<<"action">>,<<"session-terminate">>},
           {<<"sid">>,<<"03d64699-f4b9-4b61-a4d9-548feef28772">>}],
          [{xmlel,<<"reason">>,[],
             [{xmlel,<<"general-error">>,[],[]},
            {xmlel,<<"sip-error">>,
              [{<<"code">>,<<"480">>}],
              [{xmlcdata,<<"Temporarily Unavailable">>}]}]}]}]},
     "<iq from='error.480@localhost' to='alice_resp_4xx_from_sip_proxy_results_in_session_terminate_40.374447@localhost/res1' id='040d9d93-85a1-4e22-ba01-de5a8e8f9569' type='set'><jingle xmlns='urn:xmpp:jingle:1' action='session-terminate' sid='03d64699-f4b9-4b61-a4d9-548feef28772'><reason><general-error/><sip-error code='480'>Temporarily Unavailable</sip-error></reason></jingle></iq>"},
   [{escalus_new_assert,assert_true,2,
      [{file,
         "/home/circleci/app/big_tests/_build/default/lib/escalus/src/escalus_new_assert.erl"},
       {line,84}]},
    {jingle_SUITE,send_initiate_and_wait_for_first_iq_set,2,
      [{file,"/home/circleci/app/big_tests/tests/jingle_SUITE.erl"},
       {line,393}]},
    {jingle_SUITE,
      '-res...

Report log


pgsql_mnesia_24 / pgsql_mnesia / 73a5fe3
Reports root/ big
OK: 3064 / Failed: 0 / User-skipped: 211 / Auto-skipped: 0


mssql_mnesia_24 / odbc_mssql_mnesia / 73a5fe3
Reports root/ big
OK: 3063 / Failed: 1 / User-skipped: 211 / Auto-skipped: 0

inbox_SUITE:one_to_one:user_has_two_conversations
{error,
  {timeout_when_waiting_for_stanza,
    [{escalus_client,wait_for_stanza,
       [{client,
          <<"kate_user_has_two_conversations_42.905529@localhost/res1">>,
          escalus_tcp,<0.18139.0>,
          [{event_manager,<0.17969.0>},
           {server,<<"localhost">>},
           {username,<<"kate_user_has_two_conversations_42.905529">>},
           {resource,<<"res1">>}],
          [{event_client,
             [{event_manager,<0.17969.0>},
            {server,<<"localhost">>},
            {username,
              <<"kate_user_has_two_conversations_42.905529">>},
            {resource,<<"res1">>}]},
           {resource,<<"res1">>},
           {username,<<"kate_user_has_two_conversations_42.905529">>},
           {server,<<"localhost">>},
           {host,<<"localhost">>},
           {port,5222},
           {auth,{escalus_auth,auth_plain}},
           {wspath,undefined},
           {username,<<"kate_user_has_two_conversations_42.905529">>},
           {server,<<"localhost">>},
           {password,<<"makrowe;p">>},
           {stream_id,<<"fcaaa728b1782856">>}]},
        5000],
       [{file,
          "/home/circleci/app/big_tests/_build/default/lib/escalus/src/escalus_client.erl"},
        {line,136}]},
     {inbox_helper,get_inbox,3,
       [{file,"/home/circleci/app/big_tests/tests/inbox_helper.erl"},
        {line,221}]},
     {inbox_helper,check_inbox,4,
       [{file,"/home/circleci/app/big_tests/tests/inbox_helper.erl"},
        {line,167}]},
     {inbo...

Report log


mysql_redis_24 / mysql_redis / 73a5fe3
Reports root/ big
OK: 3047 / Failed: 0 / User-skipped: 228 / Auto-skipped: 0


pgsql_mnesia_23 / pgsql_mnesia / 73a5fe3
Reports root/ big
OK: 3082 / Failed: 1 / User-skipped: 211 / Auto-skipped: 0

jingle_SUITE:all:resp_4xx_from_sip_proxy_results_in_session_terminate
{error,
  {{assertion_failed,assert,is_iq_result,
     {xmlel,<<"iq">>,
       [{<<"from">>,<<"error.480@localhost">>},
        {<<"to">>,
         <<"alice_resp_4xx_from_sip_proxy_results_in_session_terminate_91.33818@localhost/res1">>},
        {<<"id">>,<<"b320d558-dd86-4454-93f6-9149a513d093">>},
        {<<"type">>,<<"set">>}],
       [{xmlel,<<"jingle">>,
          [{<<"xmlns">>,<<"urn:xmpp:jingle:1">>},
           {<<"action">>,<<"session-terminate">>},
           {<<"sid">>,<<"5dc2a2b3-588a-4a53-89e0-4f54590254ce">>}],
          [{xmlel,<<"reason">>,[],
             [{xmlel,<<"general-error">>,[],[]},
            {xmlel,<<"sip-error">>,
              [{<<"code">>,<<"480">>}],
              [{xmlcdata,<<"Temporarily Unavailable">>}]}]}]}]},
     "<iq from='error.480@localhost' to='alice_resp_4xx_from_sip_proxy_results_in_session_terminate_91.33818@localhost/res1' id='b320d558-dd86-4454-93f6-9149a513d093' type='set'><jingle xmlns='urn:xmpp:jingle:1' action='session-terminate' sid='5dc2a2b3-588a-4a53-89e0-4f54590254ce'><reason><general-error/><sip-error code='480'>Temporarily Unavailable</sip-error></reason></jingle></iq>"},
   [{escalus_new_assert,assert_true,2,
      [{file,
         "/home/circleci/app/big_tests/_build/default/lib/escalus/src/escalus_new_assert.erl"},
       {line,84}]},
    {jingle_SUITE,send_initiate_and_wait_for_first_iq_set,2,
      [{file,"/home/circleci/app/big_tests/tests/jingle_SUITE.erl"},
       {line,393}]},
    {jingle_SUITE,
      '-resp_...

Report log


riak_mnesia_24 / riak_mnesia / 73a5fe3
Reports root/ big
OK: 1709 / Failed: 0 / User-skipped: 319 / Auto-skipped: 0


mssql_mnesia_24 / odbc_mssql_mnesia / 73a5fe3
Reports root/ big
OK: 3064 / Failed: 0 / User-skipped: 211 / Auto-skipped: 0

@chrzaszcz chrzaszcz marked this pull request as ready for review September 15, 2021 12:57
@vkatsuba vkatsuba merged commit 69cc6b9 into master Sep 15, 2021
@vkatsuba vkatsuba deleted the test-mongooseimctl-with-dynamic-domains branch September 15, 2021 15:16
@Premwoik Premwoik added this to the 5.0.0 milestone Oct 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants