mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-21 23:28:44 +05:00
Remove <process_runs> const, adjust error messages and fix formatting in config
This commit is contained in:
committed by
Dan Christian Bogos
parent
c96c20f8ed
commit
f06e3446c8
@@ -661,7 +661,7 @@ const CGRATES_CFG_JSON = `
|
||||
"enabled": false, // starts attribute service: <true|false>
|
||||
"stats_conns": [], // connections to StatS, empty to disable: <""|*internal|$rpc_conns_id>
|
||||
"resources_conns": [], // connections to ResourceS, empty to disable: <""|*internal|$rpc_conns_id>
|
||||
"accounts_conns": [], // connections to AccountS, empty to disable: <""|*internal|$rpc_conns_id>
|
||||
"accounts_conns": [], // connections to AccountS, empty to disable: <""|*internal|$rpc_conns_id>
|
||||
"indexed_selects": true, // enable profile matching exclusively on indexes
|
||||
//"string_indexed_fields": [], // query indexes based on these fields for faster processing
|
||||
"prefix_indexed_fields": [], // query indexes based on these fields for faster processing
|
||||
|
||||
@@ -549,7 +549,7 @@ func (cfg *CGRConfig) checkConfigSanity() error {
|
||||
return fmt.Errorf("<%s> invalid type", utils.AttributeS)
|
||||
}
|
||||
if processRuns < 1 {
|
||||
return fmt.Errorf("<%s> process_runs needs to be bigger than 0", utils.AttributeS)
|
||||
return fmt.Errorf("<%s> processRuns needs to be bigger than 0", utils.AttributeS)
|
||||
}
|
||||
}
|
||||
if cfg.chargerSCfg.Enabled {
|
||||
|
||||
@@ -991,7 +991,7 @@ func TestConfigSanityAttributesCfg(t *testing.T) {
|
||||
utils.OptsAttributesProcessRuns: float64(0),
|
||||
},
|
||||
}
|
||||
expected := "<AttributeS> process_runs needs to be bigger than 0"
|
||||
expected := "<AttributeS> processRuns needs to be bigger than 0"
|
||||
if err := cfg.checkConfigSanity(); err == nil || err.Error() != expected {
|
||||
t.Errorf("Expecting: %+q received: %+q", expected, err)
|
||||
}
|
||||
|
||||
@@ -1873,7 +1873,6 @@ const (
|
||||
|
||||
// AttributeSCfg
|
||||
IndexedSelectsCfg = "indexed_selects"
|
||||
ProcessRunsCfg = "process_runs"
|
||||
ProfileRunsCfg = "profile_runs"
|
||||
NestedFieldsCfg = "nested_fields"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user