Skip to content

Commit

Permalink
Update expected TOML options with defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
chrzaszcz committed Nov 19, 2021
1 parent 42f008a commit fdb2122
Show file tree
Hide file tree
Showing 6 changed files with 151 additions and 66 deletions.
21 changes: 19 additions & 2 deletions test/config_parser_SUITE_data/host_types.options
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
{local_config,all_metrics_are_global,false}.
{local_config,default_server_domain,<<"localhost">>}.
{local_config,hide_service_name,false}.
{local_config,host_types,
[<<"this is host type">>,<<"some host type">>,<<"another host type">>,
<<"yet another host type">>]}.
[<<"this is host type">>,<<"some host type">>,
<<"another host type">>,<<"yet another host type">>]}.
{local_config,hosts,[<<"localhost">>]}.
{local_config,language,<<"en">>}.
{local_config,loglevel,warning}.
{local_config,mongooseimctl_access_commands,[]}.
{local_config,rdbms_server_type,generic}.
{local_config,registration_timeout,600}.
{local_config,routing_modules,
[mongoose_router_global,mongoose_router_localdomain,
mongoose_router_external_localnode,mongoose_router_external,
mongoose_router_dynamic_domains,ejabberd_s2s]}.
{local_config,sm_backend,{mnesia,[]}}.
{local_config,{auth_method,<<"another host type">>},[]}.
{local_config,{auth_method,<<"localhost">>},[test3]}.
{local_config,{auth_method,<<"some host type">>},[test2]}.
Expand All @@ -18,3 +30,8 @@
{local_config,{modules,<<"some host type">>},[]}.
{local_config,{modules,<<"this is host type">>},[]}.
{local_config,{modules,<<"yet another host type">>},[{test_mim_module1,[]}]}.
{local_config,{replaced_wait_timeout,<<"another host type">>},2000}.
{local_config,{replaced_wait_timeout,<<"localhost">>},2000}.
{local_config,{replaced_wait_timeout,<<"some host type">>},2000}.
{local_config,{replaced_wait_timeout,<<"this is host type">>},2000}.
{local_config,{replaced_wait_timeout,<<"yet another host type">>},2000}.
10 changes: 8 additions & 2 deletions test/config_parser_SUITE_data/miscellaneous.options
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{local_config,default_server_domain,<<"localhost">>}.
{local_config,hosts,[<<"localhost">>,<<"anonymous.localhost">>]}.
{local_config,all_metrics_are_global,false}.
{local_config,cowboy_server_name,"Apache"}.
{local_config,default_server_domain,<<"localhost">>}.
{local_config,hide_service_name,true}.
{local_config,host_types,[]}.
{local_config,hosts,[<<"localhost">>,<<"anonymous.localhost">>]}.
{local_config,language,<<"en">>}.
{local_config,listen,
[{{5280,{0,0,0,0},tcp},
ejabberd_cowboy,
Expand All @@ -13,9 +16,11 @@
{password,"secret"},
{shaper_rule,fast}]}]}]},
{transport_options,[{max_connections,1024},{num_acceptors,10}]}]}]}.
{local_config,loglevel,warning}.
{local_config,mongooseimctl_access_commands,
[{local,["join_cluster"],[{node,"mongooseim@prime"}]}]}.
{local_config,rdbms_server_type,mssql}.
{local_config,registration_timeout,600}.
{local_config,routing_modules,
[mongoose_router_global,mongoose_router_localdomain]}.
{local_config,services,
Expand All @@ -24,6 +29,7 @@
{periodic_report,10800000},
report,
{tracking_id,"UA-123456789"}]}]}.
{local_config,sm_backend,{mnesia,[]}}.
{local_config,{allow_multiple_connections,<<"anonymous.localhost">>},true}.
{local_config,{allow_multiple_connections,<<"localhost">>},true}.
{local_config,{anonymous_protocol,<<"anonymous.localhost">>},sasl_anon}.
Expand Down
79 changes: 47 additions & 32 deletions test/config_parser_SUITE_data/modules.options
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
{local_config,all_metrics_are_global,false}.
{local_config,default_server_domain,<<"localhost">>}.
{local_config,hide_service_name,false}.
{local_config,host_types,[]}.
{local_config,hosts,[<<"localhost">>,<<"dummy_host">>]}.
{local_config,language,<<"en">>}.
{local_config,loglevel,warning}.
{local_config,mongooseimctl_access_commands,[]}.
{local_config,rdbms_server_type,generic}.
{local_config,registration_timeout,600}.
{local_config,routing_modules,
[mongoose_router_global,mongoose_router_localdomain,
mongoose_router_external_localnode,mongoose_router_external,
mongoose_router_dynamic_domains,ejabberd_s2s]}.
{local_config,sm_backend,{mnesia,[]}}.
{local_config,
{modules,<<"dummy_host">>},
[{mod_jingle_sip,
Expand Down Expand Up @@ -36,6 +49,16 @@
{welcome_message,{"Subject","Body"}}]},
{mod_mam_rdbms_async_pool_writer,[pm]},
{mod_adhoc,[{iqdisc,one_queue},{report_commands_node,true}]},
{mod_muc,
[{access,muc},
{access_create,muc_create},
{default_room_options,
[{affiliations,
[{{<<"alice">>,<<"localhost">>,<<"resource1">>},member},
{{<<"bob">>,<<"localhost">>,<<"resource2">>},owner}]},
{password_protected,true}]},
{host,{fqdn,<<"muc.example.com">>}},
{http_auth_pool,my_auth_pool}]},
{mod_event_pusher_sns,
[{access_key_id,"AKIAIOSFODNN7EXAMPLE"},
{account_id,"123456789012"},
Expand All @@ -49,16 +72,6 @@
{region,"eu-west-1"},
{secret_access_key,"wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"},
{sns_host,"sns.eu-west-1.amazonaws.com"}]},
{mod_muc,
[{access,muc},
{access_create,muc_create},
{default_room_options,
[{affiliations,
[{{<<"alice">>,<<"localhost">>,<<"resource1">>},member},
{{<<"bob">>,<<"localhost">>,<<"resource2">>},owner}]},
{password_protected,true}]},
{host,{fqdn,<<"muc.example.com">>}},
{http_auth_pool,my_auth_pool}]},
{mod_ping,
[{ping_interval,60000},
{ping_req_timeout,32000},
Expand Down Expand Up @@ -118,15 +131,15 @@
{provision_psk,{file,"priv/provision_psk"}}]},
{ram_key_size,1000}]},
{mod_mam_rdbms_arch,[no_writer,pm]},
{mod_push_service_mongoosepush,
[{api_version,"v3"},
{max_http_connections,100},
{pool_name,mongoose_push_http}]},
{mod_bosh,
[{inactivity,20},
{maxpause,120},
{max_wait,infinity},
{server_acks,true}]},
{mod_push_service_mongoosepush,
[{api_version,"v3"},
{max_http_connections,100},
{pool_name,mongoose_push_http}]},
{mod_auth_token,
[{{validity_period,access},{13,minutes}},
{{validity_period,refresh},{13,days}}]},
Expand Down Expand Up @@ -197,8 +210,8 @@
{host,{fqdn,<<"muclight.example.com">>}},
{equal_occupants,true},
{config_schema,
[{<<"roomname">>,<<"The Room">>,roomname,binary},
{<<"display-lines">>,30,display_lines,integer}]},
[{<<"display-lines">>,30,display_lines,integer},
{<<"roomname">>,<<"The Room">>,roomname,binary}]},
{blocking,false},
{all_can_invite,true},
{all_can_configure,true}]},
Expand Down Expand Up @@ -300,6 +313,16 @@
{welcome_message,{"Subject","Body"}}]},
{mod_mam_rdbms_async_pool_writer,[pm]},
{mod_adhoc,[{iqdisc,one_queue},{report_commands_node,true}]},
{mod_muc,
[{access,muc},
{access_create,muc_create},
{default_room_options,
[{affiliations,
[{{<<"alice">>,<<"localhost">>,<<"resource1">>},member},
{{<<"bob">>,<<"localhost">>,<<"resource2">>},owner}]},
{password_protected,true}]},
{host,{fqdn,<<"muc.example.com">>}},
{http_auth_pool,my_auth_pool}]},
{mod_event_pusher_sns,
[{access_key_id,"AKIAIOSFODNN7EXAMPLE"},
{account_id,"123456789012"},
Expand All @@ -313,16 +336,6 @@
{region,"eu-west-1"},
{secret_access_key,"wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"},
{sns_host,"sns.eu-west-1.amazonaws.com"}]},
{mod_muc,
[{access,muc},
{access_create,muc_create},
{default_room_options,
[{affiliations,
[{{<<"alice">>,<<"localhost">>,<<"resource1">>},member},
{{<<"bob">>,<<"localhost">>,<<"resource2">>},owner}]},
{password_protected,true}]},
{host,{fqdn,<<"muc.example.com">>}},
{http_auth_pool,my_auth_pool}]},
{mod_ping,
[{ping_interval,60000},
{ping_req_timeout,32000},
Expand Down Expand Up @@ -382,15 +395,15 @@
{provision_psk,{file,"priv/provision_psk"}}]},
{ram_key_size,1000}]},
{mod_mam_rdbms_arch,[no_writer,pm]},
{mod_push_service_mongoosepush,
[{api_version,"v3"},
{max_http_connections,100},
{pool_name,mongoose_push_http}]},
{mod_bosh,
[{inactivity,20},
{maxpause,120},
{max_wait,infinity},
{server_acks,true}]},
{mod_push_service_mongoosepush,
[{api_version,"v3"},
{max_http_connections,100},
{pool_name,mongoose_push_http}]},
{mod_auth_token,
[{{validity_period,access},{13,minutes}},
{{validity_period,refresh},{13,days}}]},
Expand Down Expand Up @@ -461,8 +474,8 @@
{host,{fqdn,<<"muclight.example.com">>}},
{equal_occupants,true},
{config_schema,
[{<<"roomname">>,<<"The Room">>,roomname,binary},
{<<"display-lines">>,30,display_lines,integer}]},
[{<<"display-lines">>,30,display_lines,integer},
{<<"roomname">>,<<"The Room">>,roomname,binary}]},
{blocking,false},
{all_can_invite,true},
{all_can_configure,true}]},
Expand Down Expand Up @@ -528,3 +541,5 @@
{sns_host,"sns.eu-west-1.amazonaws.com"}]}]}]},
{mod_carboncopy,[{iqdisc,no_queue}]},
{mod_version,[{os_info,true}]}]}.
{local_config,{replaced_wait_timeout,<<"dummy_host">>},2000}.
{local_config,{replaced_wait_timeout,<<"localhost">>},2000}.
71 changes: 43 additions & 28 deletions test/config_parser_SUITE_data/mongooseim-pgsql.options
Original file line number Diff line number Diff line change
@@ -1,33 +1,10 @@
{local_config,{acl,local,global},[{user_regexp,<<>>}]}.
{local_config,all_metrics_are_global,false}.
{local_config,default_server_domain,<<"localhost">>}.
{local_config,hosts,[<<"localhost">>,<<"anonymous.localhost">>,<<"localhost.bis">>]}.
{local_config,hide_service_name,false}.
{local_config,host_types,[]}.
{local_config,hosts,
[<<"localhost">>,<<"anonymous.localhost">>,<<"localhost.bis">>]}.
{local_config,language,<<"en">>}.
{local_config,sm_backend,{mnesia,[]}}.
{local_config,{access,c2s,global},[{deny,blocked},{allow,all}]}.
{local_config,{access,c2s_shaper,global},[{none,admin},{normal,all}]}.
{local_config,{access,local,global},[{allow,local}]}.
{local_config,{access,mam_get_prefs,global},[{default,all}]}.
{local_config,{access,mam_get_prefs_global_shaper,global},[{mam_global_shaper,all}]}.
{local_config,{access,mam_get_prefs_shaper,global},[{mam_shaper,all}]}.
{local_config,{access,mam_lookup_messages,global},[{default,all}]}.
{local_config,{access,mam_lookup_messages_global_shaper,global},
[{mam_global_shaper,all}]}.
{local_config,{access,mam_lookup_messages_shaper,global},[{mam_shaper,all}]}.
{local_config,{access,mam_set_prefs,global},[{default,all}]}.
{local_config,{access,mam_set_prefs_global_shaper,global},[{mam_global_shaper,all}]}.
{local_config,{access,mam_set_prefs_shaper,global},[{mam_shaper,all}]}.
{local_config,{access,max_user_offline_messages,global},[{5000,admin},{100,all}]}.
{local_config,{access,max_user_sessions,global},[{10,all}]}.
{local_config,{access,muc,global},[{allow,all}]}.
{local_config,{access,muc_admin,global},[{allow,admin}]}.
{local_config,{access,muc_create,global},[{allow,local}]}.
{local_config,{access,register,global},[{allow,all}]}.
{local_config,{access,s2s_shaper,global},[{fast,all}]}.
{local_config,{shaper,fast,global},{maxrate,50000}}.
{local_config,{shaper,mam_global_shaper,global},{maxrate,1000}}.
{local_config,{shaper,mam_shaper,global},{maxrate,1}}.
{local_config,{shaper,normal,global},{maxrate,1000}}.
{local_config,all_metrics_are_global,false}.
{local_config,listen,
[{{5222,{0,0,0,0},tcp},
ejabberd_c2s,
Expand Down Expand Up @@ -119,6 +96,7 @@
{shaper_rule,fast}]}]}.
{local_config,loglevel,warning}.
{local_config,max_fsm_queue,1000}.
{local_config,mongooseimctl_access_commands,[]}.
{local_config,outgoing_pools,
[{rdbms,global,default,
[{workers,5}],
Expand All @@ -131,7 +109,12 @@
{verify,verify_peer}]}]}}]},
{redis,<<"localhost">>,global_distrib,[{workers,10}],[]}]}.
{local_config,outgoing_s2s_port,5299}.
{local_config,rdbms_server_type,generic}.
{local_config,registration_timeout,infinity}.
{local_config,routing_modules,
[mongoose_router_global,mongoose_router_localdomain,
mongoose_router_external_localnode,mongoose_router_external,
mongoose_router_dynamic_domains,ejabberd_s2s]}.
{local_config,s2s_certfile,"tools/ssl/mongooseim/server.pem"}.
{local_config,s2s_use_starttls,optional}.
{local_config,services,
Expand All @@ -141,6 +124,7 @@
stanza,stats]}]},
{service_mongoose_system_metrics,
[{initial_report,300000},{periodic_report,10800000}]}]}.
{local_config,sm_backend,{mnesia,[]}}.
{local_config,{allow_multiple_connections,<<"anonymous.localhost">>},true}.
{local_config,{anonymous_protocol,<<"anonymous.localhost">>},both}.
{local_config,{auth_method,<<"anonymous.localhost">>},[anonymous]}.
Expand Down Expand Up @@ -224,7 +208,38 @@
{mod_muc_commands,[]},
{mod_stream_management,[]},
{mod_carboncopy,[]}]}.
{local_config,{replaced_wait_timeout,<<"anonymous.localhost">>},2000}.
{local_config,{replaced_wait_timeout,<<"localhost">>},2000}.
{local_config,{replaced_wait_timeout,<<"localhost.bis">>},2000}.
{local_config,{s2s_addr,<<"fed1">>},"127.0.0.1"}.
{local_config,{s2s_default_policy,<<"anonymous.localhost">>},allow}.
{local_config,{s2s_default_policy,<<"localhost">>},allow}.
{local_config,{s2s_default_policy,<<"localhost.bis">>},allow}.
{local_config,{access,c2s,global},[{deny,blocked},{allow,all}]}.
{local_config,{access,c2s_shaper,global},[{none,admin},{normal,all}]}.
{local_config,{access,local,global},[{allow,local}]}.
{local_config,{access,mam_get_prefs,global},[{default,all}]}.
{local_config,{access,mam_get_prefs_global_shaper,global},
[{mam_global_shaper,all}]}.
{local_config,{access,mam_get_prefs_shaper,global},[{mam_shaper,all}]}.
{local_config,{access,mam_lookup_messages,global},[{default,all}]}.
{local_config,{access,mam_lookup_messages_global_shaper,global},
[{mam_global_shaper,all}]}.
{local_config,{access,mam_lookup_messages_shaper,global},[{mam_shaper,all}]}.
{local_config,{access,mam_set_prefs,global},[{default,all}]}.
{local_config,{access,mam_set_prefs_global_shaper,global},
[{mam_global_shaper,all}]}.
{local_config,{access,mam_set_prefs_shaper,global},[{mam_shaper,all}]}.
{local_config,{access,max_user_offline_messages,global},
[{5000,admin},{100,all}]}.
{local_config,{access,max_user_sessions,global},[{10,all}]}.
{local_config,{access,muc,global},[{allow,all}]}.
{local_config,{access,muc_admin,global},[{allow,admin}]}.
{local_config,{access,muc_create,global},[{allow,local}]}.
{local_config,{access,register,global},[{allow,all}]}.
{local_config,{access,s2s_shaper,global},[{fast,all}]}.
{local_config,{acl,local,global},[{user_regexp,<<>>}]}.
{local_config,{shaper,fast,global},{maxrate,50000}}.
{local_config,{shaper,mam_global_shaper,global},{maxrate,1000}}.
{local_config,{shaper,mam_shaper,global},{maxrate,1}}.
{local_config,{shaper,normal,global},{maxrate,1000}}.
19 changes: 18 additions & 1 deletion test/config_parser_SUITE_data/outgoing_pools.options
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
{local_config,all_metrics_are_global,false}.
{local_config,default_server_domain,<<"localhost">>}.
{local_config,hosts,[<<"localhost">>,<<"anonymous.localhost">>,<<"localhost.bis">>]}.
{local_config,hide_service_name,false}.
{local_config,host_types,[]}.
{local_config,hosts,
[<<"localhost">>,<<"anonymous.localhost">>,<<"localhost.bis">>]}.
{local_config,language,<<"en">>}.
{local_config,loglevel,warning}.
{local_config,mongooseimctl_access_commands,[]}.
{local_config,outgoing_pools,
[{cassandra,global,default,[],
[{keyspace,"big_mongooseim"},
Expand Down Expand Up @@ -46,3 +53,13 @@
{keyfile,"path/to/key.pem"},
{verify,verify_peer}]},
{cacertfile,"path/to/cacert.pem"}]}]}.
{local_config,rdbms_server_type,generic}.
{local_config,registration_timeout,600}.
{local_config,routing_modules,
[mongoose_router_global,mongoose_router_localdomain,
mongoose_router_external_localnode,mongoose_router_external,
mongoose_router_dynamic_domains,ejabberd_s2s]}.
{local_config,sm_backend,{mnesia,[]}}.
{local_config,{replaced_wait_timeout,<<"anonymous.localhost">>},2000}.
{local_config,{replaced_wait_timeout,<<"localhost">>},2000}.
{local_config,{replaced_wait_timeout,<<"localhost.bis">>},2000}.
17 changes: 16 additions & 1 deletion test/config_parser_SUITE_data/s2s_only.options
Original file line number Diff line number Diff line change
@@ -1,16 +1,31 @@
{local_config,all_metrics_are_global,false}.
{local_config,default_server_domain,<<"localhost">>}.
{local_config,hide_service_name,false}.
{local_config,host_types,[]}.
{local_config,hosts,[<<"localhost">>,<<"dummy_host">>]}.
{local_config,language,<<"en">>}.
{local_config,loglevel,warning}.
{local_config,mongooseimctl_access_commands,[]}.
{local_config,outgoing_s2s_families,[ipv4,ipv6]}.
{local_config,outgoing_s2s_port,5299}.
{local_config,outgoing_s2s_timeout,10000}.
{local_config,rdbms_server_type,generic}.
{local_config,registration_timeout,600}.
{local_config,routing_modules,
[mongoose_router_global,mongoose_router_localdomain,
mongoose_router_external_localnode,mongoose_router_external,
mongoose_router_dynamic_domains,ejabberd_s2s]}.
{local_config,s2s_certfile,"tools/ssl/mongooseim/server.pem"}.
{local_config,s2s_ciphers,"TLSv1.2:TLSv1.3"}.
{local_config,s2s_dns_options,[{retries,1},{timeout,30}]}.
{local_config,s2s_use_starttls,optional}.
{local_config,sm_backend,{mnesia,[]}}.
{local_config,{domain_certfile,<<"example.com">>},"/path/to/example_com.pem"}.
{local_config,{domain_certfile,<<"example.org">>},"/path/to/example_org.pem"}.
{local_config,{replaced_wait_timeout,<<"dummy_host">>},2000}.
{local_config,{replaced_wait_timeout,<<"localhost">>},2000}.
{local_config,{s2s_addr,<<"fed1">>},"127.0.0.1"}.
{local_config,{s2s_addr,<<"fed2">>},{"127.0.0.1", 8765}}.
{local_config,{s2s_addr,<<"fed2">>},{"127.0.0.1",8765}}.
{local_config,{s2s_default_policy,<<"dummy_host">>},allow}.
{local_config,{s2s_default_policy,<<"localhost">>},allow}.
{local_config,{s2s_max_retry_delay,<<"dummy_host">>},30}.
Expand Down

0 comments on commit fdb2122

Please sign in to comment.