mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-21 23:28:44 +05:00
Finish implementation for ees *file_csv format
This commit is contained in:
committed by
Dan Christian Bogos
parent
50511c0eab
commit
31387e2fe2
@@ -379,7 +379,7 @@ const CGRATES_CFG_JSON = `
|
||||
{"tag": "SetupTime", "path": "*exp.SetupTime", "type": "*variable", "value": "~*req.SetupTime", "layout": "2006-01-02T15:04:05Z07:00"},
|
||||
{"tag": "AnswerTime", "path": "*exp.AnswerTime", "type": "*variable", "value": "~*req.AnswerTime", "layout": "2006-01-02T15:04:05Z07:00"},
|
||||
{"tag": "Usage", "path": "*exp.Usage", "type": "*variable", "value": "~*req.Usage"},
|
||||
{"tag": "Cost", "path": "*exp.Cost", "type": "*variable", "value": "~*req.Cost", "rounding_decimals": 4},
|
||||
{"tag": "Cost", "path": "*exp.Cost", "type": "*variable", "value": "~*req.Cost{*round:4}"},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
@@ -1956,11 +1956,10 @@ func TestDfEventExporterCfg(t *testing.T) {
|
||||
Value: utils.StringPointer(utils.DynamicDataPrefix + utils.MetaReq + utils.NestingSep + utils.Usage),
|
||||
},
|
||||
{
|
||||
Tag: utils.StringPointer(utils.Cost),
|
||||
Path: utils.StringPointer("*exp.Cost"),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer(utils.DynamicDataPrefix + utils.MetaReq + utils.NestingSep + utils.COST),
|
||||
Rounding_decimals: utils.IntPointer(4),
|
||||
Tag: utils.StringPointer(utils.Cost),
|
||||
Path: utils.StringPointer("*exp.Cost"),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer(utils.DynamicDataPrefix + utils.MetaReq + utils.NestingSep + utils.COST + "{*round:4}"),
|
||||
},
|
||||
}
|
||||
eCfg := &EEsJsonCfg{
|
||||
|
||||
@@ -1977,12 +1977,11 @@ func TestCgrCdfEventExporter(t *testing.T) {
|
||||
Layout: time.RFC3339,
|
||||
},
|
||||
{
|
||||
Tag: utils.Cost,
|
||||
Path: "*exp.Cost",
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~*req.Cost", true, utils.INFIELD_SEP),
|
||||
Layout: time.RFC3339,
|
||||
RoundingDecimals: utils.IntPointer(4),
|
||||
Tag: utils.Cost,
|
||||
Path: "*exp.Cost",
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~*req.Cost{*round:4}", true, utils.INFIELD_SEP),
|
||||
Layout: time.RFC3339,
|
||||
},
|
||||
},
|
||||
Fields: []*FCTemplate{
|
||||
@@ -2078,12 +2077,11 @@ func TestCgrCdfEventExporter(t *testing.T) {
|
||||
Layout: time.RFC3339,
|
||||
},
|
||||
{
|
||||
Tag: utils.Cost,
|
||||
Path: "*exp.Cost",
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~*req.Cost", true, utils.INFIELD_SEP),
|
||||
Layout: time.RFC3339,
|
||||
RoundingDecimals: utils.IntPointer(4),
|
||||
Tag: utils.Cost,
|
||||
Path: "*exp.Cost",
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~*req.Cost{*round:4}", true, utils.INFIELD_SEP),
|
||||
Layout: time.RFC3339,
|
||||
},
|
||||
},
|
||||
headerFields: []*FCTemplate{},
|
||||
@@ -2258,12 +2256,11 @@ func TestCgrCfgEventExporterDefault(t *testing.T) {
|
||||
Layout: time.RFC3339,
|
||||
},
|
||||
{
|
||||
Tag: utils.Cost,
|
||||
Path: "*exp.Cost",
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~*req.Cost", true, utils.INFIELD_SEP),
|
||||
Layout: time.RFC3339,
|
||||
RoundingDecimals: utils.IntPointer(4),
|
||||
Tag: utils.Cost,
|
||||
Path: "*exp.Cost",
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~*req.Cost{*round:4}", true, utils.INFIELD_SEP),
|
||||
Layout: time.RFC3339,
|
||||
},
|
||||
},
|
||||
Fields: []*FCTemplate{
|
||||
@@ -2359,12 +2356,11 @@ func TestCgrCfgEventExporterDefault(t *testing.T) {
|
||||
Layout: time.RFC3339,
|
||||
},
|
||||
{
|
||||
Tag: utils.Cost,
|
||||
Path: "*exp.Cost",
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~*req.Cost", true, utils.INFIELD_SEP),
|
||||
Layout: time.RFC3339,
|
||||
RoundingDecimals: utils.IntPointer(4),
|
||||
Tag: utils.Cost,
|
||||
Path: "*exp.Cost",
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~*req.Cost{*round:4}", true, utils.INFIELD_SEP),
|
||||
Layout: time.RFC3339,
|
||||
},
|
||||
},
|
||||
headerFields: []*FCTemplate{},
|
||||
|
||||
@@ -256,12 +256,11 @@ func TestEventExporterSameID(t *testing.T) {
|
||||
Layout: time.RFC3339,
|
||||
},
|
||||
{
|
||||
Tag: utils.Cost,
|
||||
Path: "*exp.Cost",
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~*req.Cost", true, utils.INFIELD_SEP),
|
||||
Layout: time.RFC3339,
|
||||
RoundingDecimals: utils.IntPointer(4),
|
||||
Tag: utils.Cost,
|
||||
Path: "*exp.Cost",
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~*req.Cost{*round:4}", true, utils.INFIELD_SEP),
|
||||
Layout: time.RFC3339,
|
||||
},
|
||||
},
|
||||
contentFields: []*FCTemplate{
|
||||
@@ -357,12 +356,11 @@ func TestEventExporterSameID(t *testing.T) {
|
||||
Layout: time.RFC3339,
|
||||
},
|
||||
{
|
||||
Tag: utils.Cost,
|
||||
Path: "*exp.Cost",
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~*req.Cost", true, utils.INFIELD_SEP),
|
||||
Layout: time.RFC3339,
|
||||
RoundingDecimals: utils.IntPointer(4),
|
||||
Tag: utils.Cost,
|
||||
Path: "*exp.Cost",
|
||||
Type: utils.MetaVariable,
|
||||
Value: NewRSRParsersMustCompile("~*req.Cost{*round:4}", true, utils.INFIELD_SEP),
|
||||
Layout: time.RFC3339,
|
||||
},
|
||||
},
|
||||
headerFields: []*FCTemplate{},
|
||||
|
||||
Reference in New Issue
Block a user