Added tests for opts in ees

This commit is contained in:
Trial97
2020-10-09 09:47:58 +03:00
committed by Dan Christian Bogos
parent 61d2b4e922
commit f6eb6038ae
8 changed files with 100 additions and 41 deletions

View File

@@ -71,7 +71,7 @@
"attribute_context": "customContext",
"attempts": 1,
"field_separator": ",",
"filters": ["*string:~*req.ExporterUsed:CSVExporter"],
"filters": ["*string:~*opts.ExporterUsed:CSVExporter"],
"fields":[],
},
{
@@ -83,7 +83,7 @@
"attribute_context": "customContext",
"attempts": 1,
"field_separator": ",",
"filters": ["*string:~*req.ExporterUsed:CSVExporterComposed"],
"filters": ["*string:~*opts.ExporterUsed:CSVExporterComposed"],
"fields":[
{"tag": "Number", "path": "*hdr.Number", "type": "*constant", "value": "NumberOfEvent"},
{"tag": "CGRID", "path": "*hdr.CGRID", "type": "*constant", "value": "CGRID"},
@@ -132,7 +132,7 @@
"flags": ["*attributes"],
"attribute_context": "customContext",
"attempts": 1,
"filters": ["*string:~*req.ExporterUsed:FWVExporter"],
"filters": ["*string:~*opts.ExporterUsed:FWVExporter"],
"fields":[
{"tag": "TypeOfRecord", "path": "*hdr.TypeOfRecord", "type": "*constant",
"value": "10", "width": 2},
@@ -207,7 +207,7 @@
"flags": ["*attributes"],
"attribute_context": "customContext",
"attempts": 1,
"filters": ["*string:~*req.ExporterUsed:HTTPPostExporter"],
"filters": ["*string:~*opts.ExporterUsed:HTTPPostExporter"],
"fields":[
{"tag": "CGRID", "path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"},
{"tag": "RunID", "path": "*exp.RunID", "type": "*variable", "value": "~*req.RunID"},
@@ -233,7 +233,7 @@
"flags": ["*attributes"],
"attribute_context": "customContext",
"attempts": 1,
"filters": ["*string:~*req.ExporterUsed:HTTPJsonMapExporter"],
"filters": ["*string:~*opts.ExporterUsed:HTTPJsonMapExporter"],
"fields":[
{"tag": "CGRID", "path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"},
{"tag": "RunID", "path": "*exp.RunID", "type": "*variable", "value": "~*req.RunID"},
@@ -249,6 +249,7 @@
{"tag": "AnswerTime", "path": "*exp.AnswerTime", "type": "*variable", "value": "~*req.AnswerTime"},
{"tag": "Usage", "path": "*exp.Usage", "type": "*variable", "value": "~*req.Usage"},
{"tag": "Cost", "path": "*exp.Cost", "type": "*variable", "value": "~*req.Cost{*round:4}"},
{"tag": "EvenType", "path": "*exp.EventType", "type": "*variable", "value": "~*opts.*eventType"},
],
},
{
@@ -260,7 +261,7 @@
"attribute_context": "customContext",
"attempts": 1,
"field_separator": ",",
"filters": ["*string:~*req.ExporterUsed:CSVMaskedDestination"],
"filters": ["*string:~*opts.ExporterUsed:CSVMaskedDestination"],
"fields":[
{"tag": "CGRID", "path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"},
{"tag": "RunID", "path": "*exp.RunID", "type": "*variable", "value": "~*req.RunID"},
@@ -284,7 +285,7 @@
"type": "*virt",
"tenant": "cgrates.org",
"attempts": 1,
"filters": ["*string:~*req.ExporterUsed:RouteExporter"],
"filters": ["*string:~*opts.ExporterUsed:RouteExporter"],
"fields":[
{"tag": "Cost", "path": "*uch.<~*req.CGRID;~*req.RunID;-Cost>", "type": "*variable",
"value": "~*req.Cost", "rounding_decimals": 4},
@@ -303,7 +304,7 @@
"attribute_context": "customContext",
"attempts": 1,
"field_separator": ",",
"filters": ["*string:~*req.ExporterUsed:CSVExporterFromVirt"],
"filters": ["*string:~*opts.ExporterUsed:CSVExporterFromVirt"],
"fields":[
{"tag": "CGRID", "path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"},
{"tag": "RunID", "path": "*exp.RunID", "type": "*variable", "value": "~*req.RunID"},
@@ -328,7 +329,7 @@
"attribute_context": "customContext",
"attempts": 1,
"field_separator": ",",
"filters": ["*string:~*req.ExporterUsed:CSVExporterWIthTemplate"],
"filters": ["*string:~*opts.ExporterUsed:CSVExporterWIthTemplate"],
"fields":[
{"tag": "RequiredTemplate","type": "*template", "value": "requiredFields"},
],
@@ -339,7 +340,7 @@
"export_path": "http://localhost:9200",
"tenant": "cgrates.org",
"attempts": 1,
"filters": ["*string:~*req.ExporterUsed:ElasticExporter"],
"filters": ["*string:~*opts.ExporterUsed:ElasticExporter"],
"opts": {
"index": "cdrs",
//"if_primary_term": 0,
@@ -378,7 +379,7 @@
"flags": ["*attributes"],
"attribute_context": "customContext",
"attempts": 1,
"filters": ["*string:~*req.ExporterUsed:HTTPJsonMapExporterWithNoFields"],
"filters": ["*string:~*opts.ExporterUsed:HTTPJsonMapExporterWithNoFields"],
"fields":[]
},
{
@@ -387,7 +388,7 @@
"export_path": "http://localhost:9200",
"tenant": "cgrates.org",
"attempts": 1,
"filters": ["*string:~*req.ExporterUsed:ElasticExporterWithNoFields"],
"filters": ["*string:~*opts.ExporterUsed:ElasticExporterWithNoFields"],
"fields":[],
},
{
@@ -398,7 +399,7 @@
"flags": ["*attributes"],
"attribute_context": "customContext",
"attempts": 1,
"filters": ["*string:~*req.ExporterUsed:HTTPPostExporterWithNoFields"],
"filters": ["*string:~*opts.ExporterUsed:HTTPPostExporterWithNoFields"],
"fields":[]
}
]