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

Put mod_register opts in maps with defaults #3606

Merged
merged 1 commit into from
Mar 23, 2022

Conversation

gustawlippa
Copy link
Contributor

@gustawlippa gustawlippa commented Mar 22, 2022

Put opts in a map with defaults.

I tried to change the default value for the password_strength, as the docs suggest it should not be lower than 32. However, some random tests started failing, and after a second thought, 0 - password strength checking disabled, is also an OK default, so I just added a line of explanation to the docs.

@mongoose-im

This comment was marked as outdated.

@codecov
Copy link

codecov bot commented Mar 22, 2022

Codecov Report

Merging #3606 (9b98ec1) into master (17fbc73) will decrease coverage by 21.21%.
The diff coverage is 100.00%.

❗ Current head 9b98ec1 differs from pull request most recent head de7ead7. Consider uploading reports for the commit de7ead7 to get more accurate results

@@             Coverage Diff             @@
##           master    #3606       +/-   ##
===========================================
- Coverage   80.90%   59.68%   -21.22%     
===========================================
  Files         426      426               
  Lines       32254    32249        -5     
===========================================
- Hits        26095    19249     -6846     
- Misses       6159    13000     +6841     
Impacted Files Coverage Δ
src/mod_register.erl 76.41% <100.00%> (+1.41%) ⬆️
src/mod_aws_sns.erl 0.00% <0.00%> (-100.00%) ⬇️
src/wpool/mongoose_wpool_ldap.erl 0.00% <0.00%> (-100.00%) ⬇️
src/wpool/mongoose_wpool_rabbit.erl 0.00% <0.00%> (-100.00%) ⬇️
src/wpool/mongoose_wpool_elastic.erl 0.00% <0.00%> (-100.00%) ⬇️
src/event_pusher/mod_event_pusher_push_plugin.erl 0.00% <0.00%> (-100.00%) ⬇️
src/event_pusher/mod_event_pusher_push_backend.erl 0.00% <0.00%> (-100.00%) ⬇️
...rc/event_pusher/mod_event_pusher_http_defaults.erl 0.00% <0.00%> (-100.00%) ⬇️
...bal_distrib/mod_global_distrib_mapping_backend.erl 0.00% <0.00%> (-100.00%) ⬇️
src/event_pusher/mod_event_pusher_push_rdbms.erl 0.00% <0.00%> (-97.44%) ⬇️
... and 145 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 17fbc73...de7ead7. Read the comment docs.

@mongoose-im
Copy link
Collaborator

mongoose-im commented Mar 23, 2022

small_tests_24 / small_tests / 4a3cbbf
Reports root / small


small_tests_23 / small_tests / 4a3cbbf
Reports root / small


dynamic_domains_mysql_redis_24 / mysql_redis / 4a3cbbf
Reports root/ big
OK: 2807 / Failed: 0 / User-skipped: 150 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 4a3cbbf
Reports root/ big
OK: 2824 / Failed: 0 / User-skipped: 133 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_23 / pgsql_mnesia / 4a3cbbf
Reports root/ big
OK: 2824 / Failed: 0 / User-skipped: 133 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_24 / odbc_mssql_mnesia / 4a3cbbf
Reports root/ big
OK: 2824 / Failed: 0 / User-skipped: 133 / Auto-skipped: 0


ldap_mnesia_23 / ldap_mnesia / 4a3cbbf
Reports root/ big
OK: 1505 / Failed: 0 / User-skipped: 399 / Auto-skipped: 0


ldap_mnesia_24 / ldap_mnesia / 4a3cbbf
Reports root/ big
OK: 1505 / Failed: 0 / User-skipped: 399 / Auto-skipped: 0


internal_mnesia_24 / internal_mnesia / 4a3cbbf
Reports root/ big
OK: 1546 / Failed: 0 / User-skipped: 358 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / 4a3cbbf
Reports root/ big
OK: 3198 / Failed: 0 / User-skipped: 142 / Auto-skipped: 0


mysql_redis_24 / mysql_redis / 4a3cbbf
Reports root/ big
OK: 3193 / Failed: 0 / User-skipped: 147 / Auto-skipped: 0


elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / 4a3cbbf
Reports root/ big
OK: 1853 / Failed: 0 / User-skipped: 366 / Auto-skipped: 0


pgsql_mnesia_23 / pgsql_mnesia / 4a3cbbf
Reports root/ big
OK: 3198 / Failed: 0 / User-skipped: 142 / Auto-skipped: 0


mssql_mnesia_24 / odbc_mssql_mnesia / 4a3cbbf
Reports root/ big
OK: 3198 / Failed: 0 / User-skipped: 142 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / 4a3cbbf
Reports root/ big
OK: 1696 / Failed: 0 / User-skipped: 365 / Auto-skipped: 0

@mongoose-im
Copy link
Collaborator

mongoose-im commented Mar 23, 2022

small_tests_24 / small_tests / de7ead7
Reports root / small


small_tests_23 / small_tests / de7ead7
Reports root / small


dynamic_domains_pgsql_mnesia_23 / pgsql_mnesia / de7ead7
Reports root/ big
OK: 2824 / Failed: 0 / User-skipped: 133 / Auto-skipped: 0


dynamic_domains_mysql_redis_24 / mysql_redis / de7ead7
Reports root/ big
OK: 2807 / Failed: 0 / User-skipped: 150 / Auto-skipped: 0


dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / de7ead7
Reports root/ big
OK: 2824 / Failed: 0 / User-skipped: 133 / Auto-skipped: 0


dynamic_domains_mssql_mnesia_24 / odbc_mssql_mnesia / de7ead7
Reports root/ big
OK: 2824 / Failed: 0 / User-skipped: 133 / Auto-skipped: 0


ldap_mnesia_23 / ldap_mnesia / de7ead7
Reports root/ big
OK: 1505 / Failed: 0 / User-skipped: 399 / Auto-skipped: 0


ldap_mnesia_24 / ldap_mnesia / de7ead7
Reports root/ big
OK: 1505 / Failed: 0 / User-skipped: 399 / Auto-skipped: 0


internal_mnesia_24 / internal_mnesia / de7ead7
Reports root/ big
OK: 1546 / Failed: 0 / User-skipped: 358 / Auto-skipped: 0


pgsql_mnesia_23 / pgsql_mnesia / de7ead7
Reports root/ big
OK: 3198 / Failed: 0 / User-skipped: 142 / Auto-skipped: 0


elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / de7ead7
Reports root/ big
OK: 1853 / Failed: 0 / User-skipped: 366 / Auto-skipped: 0


pgsql_mnesia_24 / pgsql_mnesia / de7ead7
Reports root/ big
OK: 3198 / Failed: 0 / User-skipped: 142 / Auto-skipped: 0


mssql_mnesia_24 / odbc_mssql_mnesia / de7ead7
Reports root/ big
OK: 3204 / Failed: 6 / User-skipped: 142 / Auto-skipped: 0

pep_SUITE:pep_tests:delayed_receive_with_sm
{error,{{badmatch,[]},
    [{pep_SUITE,'-delayed_receive_with_sm/1-fun-0-',3,
          [{file,"/home/circleci/project/big_tests/tests/pep_SUITE.erl"},
           {line,295}]},
     {escalus_story,story,4,
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
             {line,72}]},
     {test_server,ts_tc,3,[{file,"test_server.erl"},{line,1783}]},
     {test_server,run_test_case_eval1,6,
            [{file,"test_server.erl"},{line,1292}]},
     {test_server,run_test_case_eval,9,
            [{file,"test_server.erl"},{line,1224}]}]}}

Report log

pep_SUITE:pep_tests:publish_and_notify_test
{error,{{assertion_failed,assert_many,false,[is_roster_set],[],[]},
    [{escalus_new_assert,assert_true,2,
               [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_new_assert.erl"},
                {line,84}]},
     {escalus_story,'-make_all_clients_friends/1-fun-0-',2,
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
             {line,108}]},
     {escalus_utils,'-each_with_index/3-fun-0-',3,
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_utils.erl"},
             {line,87}]},
     {lists,foldl,3,[{file,"lists.erl"},{line,1267}]},
     {escalus_utils,'-each_with_index/3-fun-0-',3,
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_utils.erl"},
             {line,87}]},
     {lists,foldl,3,[{file,"lists.erl"},{line,1267}]},
     {escalus_utils,distinct_pairs,2,
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_utils.erl"},
             {line,60}]},
     {escalus_story,make_all_clients_friends,1,
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
             {line,106}]}]}}

Report log

pep_SUITE:pep_tests:unsubscribe_after_presence_unsubscription
{error,{{assertion_failed,assert_many,false,[is_roster_set,is_presence],[],[]},
    [{escalus_new_assert,assert_true,2,
               [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_new_assert.erl"},
                {line,84}]},
     {escalus_story,'-make_all_clients_friends/1-fun-0-',2,
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
             {line,111}]},
     {escalus_utils,'-each_with_index/3-fun-0-',3,
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_utils.erl"},
             {line,87}]},
     {lists,foldl,3,[{file,"lists.erl"},{line,1267}]},
     {escalus_utils,'-each_with_index/3-fun-0-',3,
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_utils.erl"},
             {line,87}]},
     {lists,foldl,3,[{file,"lists.erl"},{line,1267}]},
     {escalus_utils,distinct_pairs,2,
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_utils.erl"},
             {line,60}]},
     {escalus_story,make_all_clients_friends,1,
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
             {line,106}]}]}}

Report log

pep_SUITE:pep_tests:authorize_access_model
{error,
  {timeout_when_waiting_for_stanza,
    [{escalus_client,wait_for_stanza,
       [{client,<<"alicE_authorize_access_model_1885@localhost/res1">>,
          escalus_tcp,<0.29324.1>,
          [{event_manager,<0.29284.1>},
           {server,<<"localhost">>},
           {username,<<"alicE_authorize_access_model_1885">>},
           {resource,<<"res1">>}],
          [{event_client,
             [{event_manager,<0.29284.1>},
            {server,<<"localhost">>},
            {username,<<"alicE_authorize_access_model_1885">>},
            {resource,<<"res1">>}]},
           {resource,<<"res1">>},
           {username,<<"alicE_authorize_access_model_1885">>},
           {server,<<"localhost">>},
           {host,<<"localhost">>},
           {port,5222},
           {auth,{escalus_auth,auth_plain}},
           {wspath,undefined},
           {username,<<"alicE_authorize_access_model_1885">>},
           {server,<<"localhost">>},
           {password,<<"matygrysa">>},
           {stream_id,<<"1a6de9868bdb1f95">>}]},
        5000],
       [{file,
          "/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_client.erl"},
        {line,136}]},
     {pubsub_tools,receive_response,3,
       [{file,"/home/circleci/project/big_tests/tests/pubsub_tools.erl"},
        {line,480}]},
     {pubsub_tools,receive_and_check_response,4,
       [{file,"/home/circleci/project/big_tests/tests/pubsub_tools.erl"},
        {line,471}]},
     {pep_SUITE,'-authorize_access_model/1...

Report log

pep_SUITE:pep_tests:h_ok_after_notify_test
{error,{{assertion_failed,assert_many,false,[is_roster_set,is_presence],[],[]},
    [{escalus_new_assert,assert_true,2,
               [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_new_assert.erl"},
                {line,84}]},
     {escalus_story,'-make_all_clients_friends/1-fun-0-',2,
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
             {line,111}]},
     {escalus_utils,'-each_with_index/3-fun-0-',3,
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_utils.erl"},
             {line,87}]},
     {lists,foldl,3,[{file,"lists.erl"},{line,1267}]},
     {escalus_utils,'-each_with_index/3-fun-0-',3,
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_utils.erl"},
             {line,87}]},
     {lists,foldl,3,[{file,"lists.erl"},{line,1267}]},
     {escalus_utils,distinct_pairs,2,
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_utils.erl"},
             {line,60}]},
     {escalus_story,make_all_clients_friends,1,
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
             {line,106}]}]}}

Report log

pep_SUITE:pep_tests:send_caps_after_login_test
{error,{{assertion_failed,assert_many,false,[is_roster_set,is_presence],[],[]},
    [{escalus_new_assert,assert_true,2,
               [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_new_assert.erl"},
                {line,84}]},
     {escalus_story,'-make_all_clients_friends/1-fun-0-',2,
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
             {line,111}]},
     {escalus_utils,'-each_with_index/3-fun-0-',3,
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_utils.erl"},
             {line,87}]},
     {lists,foldl,3,[{file,"lists.erl"},{line,1267}]},
     {escalus_utils,'-each_with_index/3-fun-0-',3,
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_utils.erl"},
             {line,87}]},
     {lists,foldl,3,[{file,"lists.erl"},{line,1267}]},
     {escalus_utils,distinct_pairs,2,
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_utils.erl"},
             {line,60}]},
     {escalus_story,make_all_clients_friends,1,
            [{file,"/home/circleci/project/big_tests/_build/default/lib/escalus/src/escalus_story.erl"},
             {line,106}]}]}}

Report log


mysql_redis_24 / mysql_redis / de7ead7
Reports root/ big
OK: 3193 / Failed: 0 / User-skipped: 147 / Auto-skipped: 0


riak_mnesia_24 / riak_mnesia / de7ead7
Reports root/ big
OK: 1696 / Failed: 0 / User-skipped: 365 / Auto-skipped: 0

@gustawlippa gustawlippa marked this pull request as ready for review March 23, 2022 12:36
@arcusfelis arcusfelis merged commit 25c7d77 into master Mar 23, 2022
@arcusfelis arcusfelis deleted the mod_register-map-config branch March 23, 2022 15:06
@Premwoik Premwoik added this to the 5.1.0 milestone May 25, 2022
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