-
Notifications
You must be signed in to change notification settings - Fork 428
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
Store listener config in a map #3495
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3495 +/- ##
==========================================
+ Coverage 80.96% 80.97% +0.01%
==========================================
Files 416 417 +1
Lines 32348 32276 -72
==========================================
- Hits 26189 26134 -55
+ Misses 6159 6142 -17
Continue to review full report at Codecov.
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
333615d
to
89b9c18
Compare
This comment has been minimized.
This comment has been minimized.
89b9c18
to
2cb5bd9
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Previously the processing continued. Now it is stopped and the errors are returned, as expected.
6224647
to
3b8b4b3
Compare
This comment has been minimized.
This comment has been minimized.
3b8b4b3
to
0def2d4
Compare
This comment has been minimized.
This comment has been minimized.
Replace the nested tuples with maps that are easier to work with. - Put config processing in a new module. - Keep the opts passed to listeners unchanged for now. - Place TLS options under the 'tls' key for now. - Validate the presence of certificate files in the config. Further improvements of particular listeners will be done in new PR's.
Also: simplify code
Also: change cert paths to existing ones
Also: start listeners with supervisors.
0def2d4
to
2e93602
Compare
small_tests_24 / small_tests / 2e93602 small_tests_23 / small_tests / 2e93602 dynamic_domains_pgsql_mnesia_23 / pgsql_mnesia / 2e93602 dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 2e93602 dynamic_domains_mysql_redis_24 / mysql_redis / 2e93602 ldap_mnesia_24 / ldap_mnesia / 2e93602 ldap_mnesia_23 / ldap_mnesia / 2e93602 dynamic_domains_mssql_mnesia_24 / odbc_mssql_mnesia / 2e93602 internal_mnesia_24 / internal_mnesia / 2e93602 pgsql_mnesia_23 / pgsql_mnesia / 2e93602 pgsql_mnesia_24 / pgsql_mnesia / 2e93602 elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / 2e93602 mysql_redis_24 / mysql_redis / 2e93602 riak_mnesia_24 / riak_mnesia / 2e93602 mssql_mnesia_24 / odbc_mssql_mnesia / 2e93602 muc_SUITE:register:user_submits_registration_form_twice{error,
{{assertion_failed,assert,is_iq_result,
[{xmlel,<<"iq">>,
[{<<"type">>,<<"set">>},
{<<"id">>,<<"8a4e5172635329f75bb2c70ab115d7bd">>},
{<<"to">>,<<"muc.localhost">>}],
[{xmlel,<<"query">>,
[{<<"xmlns">>,<<"jabber:iq:register">>}],
[{xmlel,<<"x">>,
[{<<"xmlns">>,<<"jabber:x:data">>},
{<<"type">>,<<"submit">>}],
[{xmlel,<<"field">>,
[{<<"type">>,<<"hidden">>},
{<<"var">>,<<"FORM_TYPE">>}],
[{xmlel,<<"value">>,[],
[{xmlcdata,<<"jabber:iq:register">>}]}]},
{xmlel,<<"field">>,
[{<<"type">>,<<"text-single">>},
{<<"var">>,<<"nick">>}],
[{xmlel,<<"value">>,[],
[{xmlcdata,
<<"thirdwitchroom-67a5afa352">>}]}]}]}]}]}],
{xmlel,<<"iq">>,
[{<<"from">>,<<"muc.localhost">>},
{<<"to">>,
<<"alicE_user_submits_registration_form_twice_1909@localhost/res1">>},
{<<"type">>,<<"error">>},
{<<"xml:lang">>,<<"en">>},
{<<"id">>,<<"8a4e5172635329f75bb2c70ab115d7bd">>}],
[{xmlel,<<"query">>,
[{<<"xmlns">>,<<"jabber:iq:register">>}],
[{xmlel,<<"x">>,
[{<<"xmlns">>,<<"jabber:x:data">>},
{<<"type">>,<<"submit">>}],
[{xmlel,<<"field">>,
[{<<"type">>,<<"hidden">>},
{<<"var">>,<<"FORM_TYPE">>}],
... |
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.
I only have two comments that are honestly nothing more than wishful perfectionism, this code is fantastic as it is and can be merged, I just wanted to raise some thoughts 😄
small_tests_24 / small_tests / 80c2195 small_tests_23 / small_tests / 80c2195 dynamic_domains_mysql_redis_24 / mysql_redis / 80c2195 dynamic_domains_pgsql_mnesia_24 / pgsql_mnesia / 80c2195 dynamic_domains_pgsql_mnesia_23 / pgsql_mnesia / 80c2195 dynamic_domains_mssql_mnesia_24 / odbc_mssql_mnesia / 80c2195 ldap_mnesia_24 / ldap_mnesia / 80c2195 ldap_mnesia_23 / ldap_mnesia / 80c2195 internal_mnesia_24 / internal_mnesia / 80c2195 pgsql_mnesia_23 / pgsql_mnesia / 80c2195 pgsql_mnesia_24 / pgsql_mnesia / 80c2195 elasticsearch_and_cassandra_24 / elasticsearch_and_cassandra_mnesia / 80c2195 mssql_mnesia_24 / odbc_mssql_mnesia / 80c2195 mysql_redis_24 / mysql_redis / 80c2195 riak_mnesia_24 / riak_mnesia / 80c2195 |
Store configured listeners in
mongoose_config
maps instead of tuples with nested structures inside.Example - before:
After:
Other changes:
tls
option.Note: Nested options, e.g. TLS are left unchanged for now. The
modules
option for HTTP handlers modules might need renaming to avoid confusion withmodule
. File presence checks need to be added for some nested options as well.