-
Notifications
You must be signed in to change notification settings - Fork 421
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
Use dynamic aware check for global domains in ACL module #3327
Conversation
Add dynamic domain testing for ACL Add mongoose_domain_api:stop/0 function
small_tests_24 / small_tests / 2da2c7e internal_mnesia_24 / internal_mnesia / 2da2c7e small_tests_23 / small_tests / 2da2c7e dynamic_domains_mysql_redis_24 / mysql_redis / 2da2c7e dynamic_domains_SUITE:with_mod_dynamic_domains_test:packet_handling_for_subdomain{error,
{{badrpc,
{'EXIT',
{timeout,
[{meck_proc,wait,6,
[{file,
"/home/circleci/app/_build/default/lib/meck/src/meck_proc.erl"},
{line,171}]},
{meck,wait,5,[]}]}}},
[{distributed_helper,rpc,
[#{node => mongooseim@localhost},
meck,wait,
[3,mod_dynamic_domains_test,process_packet,5,500]],
[{file,"/home/circleci/app/big_tests/tests/distributed_helper.erl"},
{line,117}]},
{dynamic_domains_SUITE,'-packet_handling_for_subdomain/1-fun-3-',1,
[{file,
"/home/circleci/app/big_tests/tests/dynamic_domains_SUITE.erl"},
{line,113}]},
{escalus_story,story,4,
[{file,
"/home/circleci/app/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}]}]}} dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 2da2c7e dynamic_domains_pgsql_mnesia_23 / pgsql_mnesia / 2da2c7e ldap_mnesia_24 / ldap_mnesia / 2da2c7e ldap_mnesia_23 / ldap_mnesia / 2da2c7e dynamic_domains_mssql_mnesia_24 / odbc_mssql_mnesia / 2da2c7e pgsql_mnesia_24 / pgsql_mnesia / 2da2c7e 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_86.490486@localhost/res1">>},
{<<"id">>,<<"213f72ae-75b0-4c7a-af34-58454d6a86e3">>},
{<<"type">>,<<"set">>}],
[{xmlel,<<"jingle">>,
[{<<"xmlns">>,<<"urn:xmpp:jingle:1">>},
{<<"action">>,<<"session-terminate">>},
{<<"sid">>,<<"88e8cd58-6b73-478f-b6d5-2066b7e69399">>}],
[{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_86.490486@localhost/res1' id='213f72ae-75b0-4c7a-af34-58454d6a86e3' type='set'><jingle xmlns='urn:xmpp:jingle:1' action='session-terminate' sid='88e8cd58-6b73-478f-b6d5-2066b7e69399'><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,395}]},
{jingle_SUITE,
'-res... 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_96.417289@localhost/res1">>},
{<<"id">>,<<"178ea6ce-5382-4e12-b4a2-e0bc8278d4ab">>},
{<<"type">>,<<"set">>}],
[{xmlel,<<"jingle">>,
[{<<"xmlns">>,<<"urn:xmpp:jingle:1">>},
{<<"action">>,<<"session-terminate">>},
{<<"sid">>,<<"2c90ec13-a074-4a0f-8716-d9ce5403237c">>}],
[{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_96.417289@localhost/res1' id='178ea6ce-5382-4e12-b4a2-e0bc8278d4ab' type='set'><jingle xmlns='urn:xmpp:jingle:1' action='session-terminate' sid='2c90ec13-a074-4a0f-8716-d9ce5403237c'><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,395}]},
{jingle_SUITE,
'-res... mysql_redis_24 / mysql_redis / 2da2c7e elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / 2da2c7e pgsql_mnesia_23 / pgsql_mnesia / 2da2c7e mssql_mnesia_24 / odbc_mssql_mnesia / 2da2c7e riak_mnesia_24 / riak_mnesia / 2da2c7e |
Codecov Report
@@ Coverage Diff @@
## master #3327 +/- ##
==========================================
+ Coverage 80.69% 80.71% +0.02%
==========================================
Files 397 397
Lines 32434 32440 +6
==========================================
+ Hits 26171 26185 +14
+ Misses 6263 6255 -8
Continue to review full report at Codecov.
|
small_tests_24 / small_tests / ddd2d8c internal_mnesia_24 / internal_mnesia / ddd2d8c small_tests_23 / small_tests / ddd2d8c dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / ddd2d8c ldap_mnesia_24 / ldap_mnesia / ddd2d8c dynamic_domains_mssql_mnesia_24 / odbc_mssql_mnesia / ddd2d8c dynamic_domains_mysql_redis_24 / mysql_redis / ddd2d8c dynamic_domains_pgsql_mnesia_23 / pgsql_mnesia / ddd2d8c elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / ddd2d8c ldap_mnesia_23 / ldap_mnesia / ddd2d8c pgsql_mnesia_24 / pgsql_mnesia / ddd2d8c mysql_redis_24 / mysql_redis / ddd2d8c mssql_mnesia_24 / odbc_mssql_mnesia / ddd2d8c pgsql_mnesia_23 / pgsql_mnesia / ddd2d8c riak_mnesia_24 / riak_mnesia / ddd2d8c |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes look good to me.
@@ -37,6 +39,15 @@ init() -> | |||
mongoose_subdomain_core:start(), | |||
mongoose_lazy_routing:start(). | |||
|
|||
%% Stops gen_servers, that are started from init/0 | |||
%% Does not fail, even if servers are already stopped | |||
-spec stop() -> ok. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: this should be used only in tests because the way catch
is used makes it completely ignore any errors.
This PR addresses MIM-1522
Proposed changes include:
Does not add support to allow to do ACL per host-type. I think a separate PR is needed for that ;)