mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Updated config tests
This commit is contained in:
committed by
Dan Christian Bogos
parent
c5e40efb9d
commit
1c4211612d
@@ -330,6 +330,7 @@ const CGRATES_CFG_JSON = `
|
||||
{"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable", "value": "~*req.12", "mandatory": true},
|
||||
{"tag": "Usage", "path": "Usage", "type": "*variable", "value": "~*req.13", "mandatory": true},
|
||||
],
|
||||
"cache_dump_fields": [],
|
||||
"continue": false, // continue to the next template if executed
|
||||
},
|
||||
],
|
||||
|
||||
@@ -446,29 +446,31 @@ func testCGRConfigReloadERs(t *testing.T) {
|
||||
SessionSConns: []string{utils.MetaLocalHost},
|
||||
Readers: []*EventReaderCfg{
|
||||
&EventReaderCfg{
|
||||
ID: utils.MetaDefault,
|
||||
Type: utils.MetaFileCSV,
|
||||
FieldSep: ",",
|
||||
RunDelay: 0,
|
||||
ConcurrentReqs: 1024,
|
||||
SourcePath: "/var/spool/cgrates/cdrc/in",
|
||||
ProcessedPath: "/var/spool/cgrates/cdrc/out",
|
||||
Filters: []string{},
|
||||
Flags: flagsDefault,
|
||||
Fields: content,
|
||||
XmlRootPath: utils.HierarchyPath{utils.EmptyString},
|
||||
ID: utils.MetaDefault,
|
||||
Type: utils.MetaFileCSV,
|
||||
FieldSep: ",",
|
||||
RunDelay: 0,
|
||||
ConcurrentReqs: 1024,
|
||||
SourcePath: "/var/spool/cgrates/cdrc/in",
|
||||
ProcessedPath: "/var/spool/cgrates/cdrc/out",
|
||||
Filters: []string{},
|
||||
Flags: flagsDefault,
|
||||
Fields: content,
|
||||
CacheDumpFields: []*FCTemplate{},
|
||||
XmlRootPath: utils.HierarchyPath{utils.EmptyString},
|
||||
},
|
||||
&EventReaderCfg{
|
||||
ID: "file_reader1",
|
||||
Type: utils.MetaFileCSV,
|
||||
FieldSep: ",",
|
||||
RunDelay: -1,
|
||||
ConcurrentReqs: 1024,
|
||||
SourcePath: "/tmp/ers/in",
|
||||
ProcessedPath: "/tmp/ers/out",
|
||||
Flags: flags,
|
||||
Fields: content,
|
||||
XmlRootPath: utils.HierarchyPath{utils.EmptyString},
|
||||
ID: "file_reader1",
|
||||
Type: utils.MetaFileCSV,
|
||||
FieldSep: ",",
|
||||
RunDelay: -1,
|
||||
ConcurrentReqs: 1024,
|
||||
SourcePath: "/tmp/ers/in",
|
||||
ProcessedPath: "/tmp/ers/out",
|
||||
Flags: flags,
|
||||
Fields: content,
|
||||
CacheDumpFields: []*FCTemplate{},
|
||||
XmlRootPath: utils.HierarchyPath{utils.EmptyString},
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -832,7 +834,7 @@ func testCgrCfgV1ReloadConfigSection(t *testing.T) {
|
||||
map[string]interface{}{
|
||||
"PartialCacheExpiryAction": "",
|
||||
"PartialRecordCache": 0,
|
||||
"CacheDumpFields": nil,
|
||||
"CacheDumpFields": []interface{}{},
|
||||
"ConcurrentReqs": 1024,
|
||||
"Fields": content,
|
||||
"FieldSep": ",",
|
||||
@@ -849,7 +851,7 @@ func testCgrCfgV1ReloadConfigSection(t *testing.T) {
|
||||
"XmlRootPath": []interface{}{utils.EmptyString},
|
||||
},
|
||||
map[string]interface{}{
|
||||
"CacheDumpFields": nil,
|
||||
"CacheDumpFields": []interface{}{},
|
||||
"ConcurrentReqs": 1024,
|
||||
"FieldSep": ",",
|
||||
"Filters": nil,
|
||||
|
||||
@@ -1665,6 +1665,7 @@ func TestDfEventReaderCfg(t *testing.T) {
|
||||
Filters: &[]string{},
|
||||
Flags: &[]string{},
|
||||
Fields: &cdrFields,
|
||||
Cache_dump_fields: &[]*FcTemplateJsonCfg{},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1705,6 +1705,7 @@ func TestCgrCdfEventReader(t *testing.T) {
|
||||
{Tag: "Usage", Path: "Usage", Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~*req.13", true, utils.INFIELD_SEP), Mandatory: true},
|
||||
},
|
||||
CacheDumpFields: []*FCTemplate{},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -135,6 +135,7 @@ func TestEventReaderLoadFromJSON(t *testing.T) {
|
||||
{Tag: "Usage", Path: "Usage", Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~*req.13", true, utils.INFIELD_SEP), Mandatory: true},
|
||||
},
|
||||
CacheDumpFields: make([]*FCTemplate, 0),
|
||||
},
|
||||
&EventReaderCfg{
|
||||
ID: "file_reader1",
|
||||
@@ -189,6 +190,7 @@ func TestEventReaderLoadFromJSON(t *testing.T) {
|
||||
"type": "*file_csv",
|
||||
"source_path": "/tmp/ers/in",
|
||||
"processed_path": "/tmp/ers/out",
|
||||
"cache_dump_fields": [],
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
@@ -310,6 +310,7 @@
|
||||
// {"tag": "AnswerTime", "path": "AnswerTime", "type": "*variable", "value": "~*req.12", "mandatory": true},
|
||||
// {"tag": "Usage", "path": "Usage", "type": "*variable", "value": "~*req.13", "mandatory": true},
|
||||
// ],
|
||||
// "cache_dump_fields": [],
|
||||
// "continue": false, // continue to the next template if executed
|
||||
// },
|
||||
// ],
|
||||
|
||||
Reference in New Issue
Block a user