mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-22 07:38:45 +05:00
Remove RSRSep opt from general section
- allows RSRParser to be split gracefully from config (was depending on RSRSep, which was retrieved from the global config variable) - default separator (;) was the only one used except for splitting inline attribute values (where ANDSep is used)
This commit is contained in:
committed by
Dan Christian Bogos
parent
c60712f454
commit
36a7d174ab
@@ -131,13 +131,13 @@ func testSectConfigSReloadGeneral(t *testing.T) {
|
||||
var reply string
|
||||
if err := testSectRPC.Call(context.Background(), utils.ConfigSv1SetConfigFromJSON, &config.SetConfigFromJSONArgs{
|
||||
Tenant: "cgrates.org",
|
||||
Config: `{"general":{"connect_attempts":5,"connect_timeout":"1s","dbdata_encoding":"*msgpack","default_caching":"*reload","default_category":"call","default_request_type":"*rated","default_tenant":"cgrates.org","default_timezone":"Local","digest_equal":":","digest_separator":",","failed_posts_dir":"/var/spool/cgrates/failed_posts","failed_posts_ttl":"5s","locking_timeout":"0","log_level":7,"logger":"*syslog","max_parallel_conns":100,"node_id":"98ead14","poster_attempts":3,"reconnects":-1,"reply_timeout":"50s","rounding_decimals":5,"rsr_separator":";","tpexport_dir":"/var/spool/cgrates/tpe"}}`,
|
||||
Config: `{"general":{"connect_attempts":5,"connect_timeout":"1s","dbdata_encoding":"*msgpack","default_caching":"*reload","default_category":"call","default_request_type":"*rated","default_tenant":"cgrates.org","default_timezone":"Local","digest_equal":":","digest_separator":",","failed_posts_dir":"/var/spool/cgrates/failed_posts","failed_posts_ttl":"5s","locking_timeout":"0","log_level":7,"logger":"*syslog","max_parallel_conns":100,"node_id":"98ead14","poster_attempts":3,"reconnects":-1,"reply_timeout":"50s","rounding_decimals":5,"tpexport_dir":"/var/spool/cgrates/tpe"}}`,
|
||||
}, &reply); err != nil {
|
||||
t.Error(err)
|
||||
} else if reply != utils.OK {
|
||||
t.Errorf("Expected OK received: %+v", reply)
|
||||
}
|
||||
cfgStr := `{"general":{"caching_delay":"0","connect_attempts":5,"connect_timeout":"1s","dbdata_encoding":"*msgpack","decimal_max_scale":0,"decimal_min_scale":0,"decimal_precision":0,"decimal_rounding_mode":"*toNearestEven","default_caching":"*reload","default_category":"call","default_request_type":"*rated","default_tenant":"cgrates.org","default_timezone":"Local","digest_equal":":","digest_separator":",","locking_timeout":"0","max_parallel_conns":100,"max_reconnect_interval":"0","node_id":"98ead14","opts":{"*exporterIDs":[]},"reconnects":-1,"reply_timeout":"50s","rounding_decimals":5,"rsr_separator":";","tpexport_dir":"/var/spool/cgrates/tpe"}}`
|
||||
cfgStr := `{"general":{"caching_delay":"0","connect_attempts":5,"connect_timeout":"1s","dbdata_encoding":"*msgpack","decimal_max_scale":0,"decimal_min_scale":0,"decimal_precision":0,"decimal_rounding_mode":"*toNearestEven","default_caching":"*reload","default_category":"call","default_request_type":"*rated","default_tenant":"cgrates.org","default_timezone":"Local","digest_equal":":","digest_separator":",","locking_timeout":"0","max_parallel_conns":100,"max_reconnect_interval":"0","node_id":"98ead14","opts":{"*exporterIDs":[]},"reconnects":-1,"reply_timeout":"50s","rounding_decimals":5,"tpexport_dir":"/var/spool/cgrates/tpe"}}`
|
||||
var rpl string
|
||||
if err := testSectRPC.Call(context.Background(), utils.ConfigSv1GetConfigAsJSON, &config.SectionWithAPIOpts{
|
||||
Tenant: "cgrates.org",
|
||||
|
||||
Reference in New Issue
Block a user