mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Updated integration tests
This commit is contained in:
committed by
Dan Christian Bogos
parent
1c4211612d
commit
5cf8306f42
@@ -429,17 +429,17 @@ func testCGRConfigReloadERs(t *testing.T) {
|
||||
flags, _ := utils.FlagsWithParamsFromSlice([]string{"*dryrun"})
|
||||
flagsDefault, _ := utils.FlagsWithParamsFromSlice([]string{})
|
||||
content := []*FCTemplate{
|
||||
&FCTemplate{Tag: "ToR", Path: utils.ToR, Type: utils.META_COMPOSED, Value: NewRSRParsersMustCompile("~*req.2", true, utils.INFIELD_SEP), Mandatory: true},
|
||||
&FCTemplate{Tag: utils.OriginID, Path: utils.OriginID, Type: utils.META_COMPOSED, Value: NewRSRParsersMustCompile("~*req.3", true, utils.INFIELD_SEP), Mandatory: true},
|
||||
&FCTemplate{Tag: utils.RequestType, Path: utils.RequestType, Type: utils.META_COMPOSED, Value: NewRSRParsersMustCompile("~*req.4", true, utils.INFIELD_SEP), Mandatory: true},
|
||||
&FCTemplate{Tag: utils.Tenant, Path: utils.Tenant, Type: utils.META_COMPOSED, Value: NewRSRParsersMustCompile("~*req.6", true, utils.INFIELD_SEP), Mandatory: true},
|
||||
&FCTemplate{Tag: utils.Category, Path: utils.Category, Type: utils.META_COMPOSED, Value: NewRSRParsersMustCompile("~*req.7", true, utils.INFIELD_SEP), Mandatory: true},
|
||||
&FCTemplate{Tag: utils.Account, Path: utils.Account, Type: utils.META_COMPOSED, Value: NewRSRParsersMustCompile("~*req.8", true, utils.INFIELD_SEP), Mandatory: true},
|
||||
&FCTemplate{Tag: utils.Subject, Path: utils.Subject, Type: utils.META_COMPOSED, Value: NewRSRParsersMustCompile("~*req.9", true, utils.INFIELD_SEP), Mandatory: true},
|
||||
&FCTemplate{Tag: utils.Destination, Path: utils.Destination, Type: utils.META_COMPOSED, Value: NewRSRParsersMustCompile("~*req.10", true, utils.INFIELD_SEP), Mandatory: true},
|
||||
&FCTemplate{Tag: utils.SetupTime, Path: utils.SetupTime, Type: utils.META_COMPOSED, Value: NewRSRParsersMustCompile("~*req.11", true, utils.INFIELD_SEP), Mandatory: true},
|
||||
&FCTemplate{Tag: utils.AnswerTime, Path: utils.AnswerTime, Type: utils.META_COMPOSED, Value: NewRSRParsersMustCompile("~*req.12", true, utils.INFIELD_SEP), Mandatory: true},
|
||||
&FCTemplate{Tag: utils.Usage, Path: utils.Usage, Type: utils.META_COMPOSED, Value: NewRSRParsersMustCompile("~*req.13", true, utils.INFIELD_SEP), Mandatory: true},
|
||||
&FCTemplate{Tag: "ToR", Path: utils.ToR, Type: utils.MetaVariable, Value: NewRSRParsersMustCompile("~*req.2", true, utils.INFIELD_SEP), Mandatory: true},
|
||||
&FCTemplate{Tag: utils.OriginID, Path: utils.OriginID, Type: utils.MetaVariable, Value: NewRSRParsersMustCompile("~*req.3", true, utils.INFIELD_SEP), Mandatory: true},
|
||||
&FCTemplate{Tag: utils.RequestType, Path: utils.RequestType, Type: utils.MetaVariable, Value: NewRSRParsersMustCompile("~*req.4", true, utils.INFIELD_SEP), Mandatory: true},
|
||||
&FCTemplate{Tag: utils.Tenant, Path: utils.Tenant, Type: utils.MetaVariable, Value: NewRSRParsersMustCompile("~*req.6", true, utils.INFIELD_SEP), Mandatory: true},
|
||||
&FCTemplate{Tag: utils.Category, Path: utils.Category, Type: utils.MetaVariable, Value: NewRSRParsersMustCompile("~*req.7", true, utils.INFIELD_SEP), Mandatory: true},
|
||||
&FCTemplate{Tag: utils.Account, Path: utils.Account, Type: utils.MetaVariable, Value: NewRSRParsersMustCompile("~*req.8", true, utils.INFIELD_SEP), Mandatory: true},
|
||||
&FCTemplate{Tag: utils.Subject, Path: utils.Subject, Type: utils.MetaVariable, Value: NewRSRParsersMustCompile("~*req.9", true, utils.INFIELD_SEP), Mandatory: true},
|
||||
&FCTemplate{Tag: utils.Destination, Path: utils.Destination, Type: utils.MetaVariable, Value: NewRSRParsersMustCompile("~*req.10", true, utils.INFIELD_SEP), Mandatory: true},
|
||||
&FCTemplate{Tag: utils.SetupTime, Path: utils.SetupTime, Type: utils.MetaVariable, Value: NewRSRParsersMustCompile("~*req.11", true, utils.INFIELD_SEP), Mandatory: true},
|
||||
&FCTemplate{Tag: utils.AnswerTime, Path: utils.AnswerTime, Type: utils.MetaVariable, Value: NewRSRParsersMustCompile("~*req.12", true, utils.INFIELD_SEP), Mandatory: true},
|
||||
&FCTemplate{Tag: utils.Usage, Path: utils.Usage, Type: utils.MetaVariable, Value: NewRSRParsersMustCompile("~*req.13", true, utils.INFIELD_SEP), Mandatory: true},
|
||||
}
|
||||
expAttr := &ERsCfg{
|
||||
Enabled: true,
|
||||
@@ -569,7 +569,7 @@ func testCgrCfgV1ReloadConfigSection(t *testing.T) {
|
||||
"Strip": "",
|
||||
"Tag": "ToR",
|
||||
"Timezone": "",
|
||||
"Type": "*composed",
|
||||
"Type": "*variable",
|
||||
"Value": []interface{}{
|
||||
map[string]interface{}{
|
||||
"AllFiltersMatch": true,
|
||||
@@ -594,7 +594,7 @@ func testCgrCfgV1ReloadConfigSection(t *testing.T) {
|
||||
"Strip": "",
|
||||
"Tag": "OriginID",
|
||||
"Timezone": "",
|
||||
"Type": "*composed",
|
||||
"Type": "*variable",
|
||||
"Value": []interface{}{
|
||||
map[string]interface{}{
|
||||
"AllFiltersMatch": true,
|
||||
@@ -619,7 +619,7 @@ func testCgrCfgV1ReloadConfigSection(t *testing.T) {
|
||||
"Strip": "",
|
||||
"Tag": "RequestType",
|
||||
"Timezone": "",
|
||||
"Type": "*composed",
|
||||
"Type": "*variable",
|
||||
"Value": []interface{}{
|
||||
map[string]interface{}{
|
||||
"AllFiltersMatch": true,
|
||||
@@ -644,7 +644,7 @@ func testCgrCfgV1ReloadConfigSection(t *testing.T) {
|
||||
"Strip": "",
|
||||
"Tag": "Tenant",
|
||||
"Timezone": "",
|
||||
"Type": "*composed",
|
||||
"Type": "*variable",
|
||||
"Value": []interface{}{
|
||||
map[string]interface{}{
|
||||
"AllFiltersMatch": true,
|
||||
@@ -669,7 +669,7 @@ func testCgrCfgV1ReloadConfigSection(t *testing.T) {
|
||||
"Strip": "",
|
||||
"Tag": "Category",
|
||||
"Timezone": "",
|
||||
"Type": "*composed",
|
||||
"Type": "*variable",
|
||||
"Value": []interface{}{
|
||||
map[string]interface{}{
|
||||
"AllFiltersMatch": true,
|
||||
@@ -694,7 +694,7 @@ func testCgrCfgV1ReloadConfigSection(t *testing.T) {
|
||||
"Strip": "",
|
||||
"Tag": "Account",
|
||||
"Timezone": "",
|
||||
"Type": "*composed",
|
||||
"Type": "*variable",
|
||||
"Value": []interface{}{
|
||||
map[string]interface{}{
|
||||
"AllFiltersMatch": true,
|
||||
@@ -719,7 +719,7 @@ func testCgrCfgV1ReloadConfigSection(t *testing.T) {
|
||||
"Strip": "",
|
||||
"Tag": "Subject",
|
||||
"Timezone": "",
|
||||
"Type": "*composed",
|
||||
"Type": "*variable",
|
||||
"Value": []interface{}{
|
||||
map[string]interface{}{
|
||||
"AllFiltersMatch": true,
|
||||
@@ -744,7 +744,7 @@ func testCgrCfgV1ReloadConfigSection(t *testing.T) {
|
||||
"Strip": "",
|
||||
"Tag": "Destination",
|
||||
"Timezone": "",
|
||||
"Type": "*composed",
|
||||
"Type": "*variable",
|
||||
"Value": []interface{}{
|
||||
map[string]interface{}{
|
||||
"AllFiltersMatch": true,
|
||||
@@ -769,7 +769,7 @@ func testCgrCfgV1ReloadConfigSection(t *testing.T) {
|
||||
"Strip": "",
|
||||
"Tag": "SetupTime",
|
||||
"Timezone": "",
|
||||
"Type": "*composed",
|
||||
"Type": "*variable",
|
||||
"Value": []interface{}{
|
||||
map[string]interface{}{
|
||||
"AllFiltersMatch": true,
|
||||
@@ -794,7 +794,7 @@ func testCgrCfgV1ReloadConfigSection(t *testing.T) {
|
||||
"Strip": "",
|
||||
"Tag": "AnswerTime",
|
||||
"Timezone": "",
|
||||
"Type": "*composed",
|
||||
"Type": "*variable",
|
||||
"Value": []interface{}{
|
||||
map[string]interface{}{
|
||||
"AllFiltersMatch": true,
|
||||
@@ -819,7 +819,7 @@ func testCgrCfgV1ReloadConfigSection(t *testing.T) {
|
||||
"Strip": "",
|
||||
"Tag": "Usage",
|
||||
"Timezone": "",
|
||||
"Type": "*composed",
|
||||
"Type": "*variable",
|
||||
"Value": []interface{}{
|
||||
map[string]interface{}{
|
||||
"AllFiltersMatch": true,
|
||||
|
||||
@@ -296,8 +296,7 @@
|
||||
// "timezone": "", // timezone for timestamps where not specified <""|UTC|Local|$IANA_TZ_DB>
|
||||
// "filters": [], // limit parsing based on the filters
|
||||
// "flags": [], // flags to influence the event processing
|
||||
// "header_fields": [], // template of the import header fields
|
||||
// "content_fields":[ // import content_fields template, tag will match internally CDR field, in case of .csv value will be represented by index of the field value
|
||||
// "fields":[ // import content_fields template, tag will match internally CDR field, in case of .csv value will be represented by index of the field value
|
||||
// {"tag": "ToR", "path": "ToR", "type": "*variable", "value": "~*req.2", "mandatory": true},
|
||||
// {"tag": "OriginID", "path": "OriginID", "type": "*variable", "value": "~*req.3", "mandatory": true},
|
||||
// {"tag": "RequestType", "path": "RequestType", "type": "*variable", "value": "~*req.4", "mandatory": true},
|
||||
@@ -789,7 +788,8 @@
|
||||
// },
|
||||
|
||||
|
||||
// "apier": {
|
||||
// "apiers": {
|
||||
// "enabled": false,
|
||||
// "caches_conns":["*internal"],
|
||||
// "scheduler_conns": [], // connections to SchedulerS for reloads
|
||||
// "attributes_conns": [], // connections to AttributeS for CDRExporter
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
"data_db": {
|
||||
"db_type": "mongo",
|
||||
"db_name": "10",
|
||||
"db_name": "12",
|
||||
"db_port": 27017,
|
||||
},
|
||||
|
||||
|
||||
@@ -1,93 +1,93 @@
|
||||
{
|
||||
// CGRateS Configuration file
|
||||
//
|
||||
{
|
||||
// CGRateS Configuration file
|
||||
//
|
||||
|
||||
|
||||
"general": {
|
||||
"node_id": "ALL2",
|
||||
"log_level": 7
|
||||
},
|
||||
|
||||
|
||||
"listen": {
|
||||
"rpc_json": ":7012",
|
||||
"rpc_gob": ":7013",
|
||||
"http": ":7080",
|
||||
},
|
||||
|
||||
"data_db": { // database used to store runtime data (eg: accounts, cdr stats)
|
||||
"db_type": "redis", // data_db type: <redis|mongo>
|
||||
"db_port": 6379, // data_db port to reach the database
|
||||
"db_name": "12", // data_db database name to connect to
|
||||
},
|
||||
|
||||
"stor_db": {
|
||||
"db_type":"*internal",
|
||||
},
|
||||
|
||||
|
||||
"rpc_conns": {
|
||||
"conn1": {
|
||||
"strategy": "*first",
|
||||
"conns": [{"address": "127.0.0.1:7012", "transport":"*json"}],
|
||||
"general": {
|
||||
"node_id": "ALL2",
|
||||
"log_level": 7
|
||||
},
|
||||
},
|
||||
|
||||
"attributes": {
|
||||
"enabled": true
|
||||
},
|
||||
|
||||
"rals": {
|
||||
"enabled": true,
|
||||
},
|
||||
|
||||
"schedulers": {
|
||||
"enabled": true,
|
||||
},
|
||||
|
||||
"chargers": {
|
||||
"enabled": true,
|
||||
"attributes_conns": ["*internal"],
|
||||
},
|
||||
|
||||
"thresholds": {
|
||||
"enabled": true,
|
||||
},
|
||||
|
||||
"suppliers": {
|
||||
"enabled": true,
|
||||
},
|
||||
|
||||
"stats": {
|
||||
"enabled": true,
|
||||
},
|
||||
|
||||
"resources": {
|
||||
"enabled": true,
|
||||
},
|
||||
|
||||
"cdrs": {
|
||||
"enabled": true,
|
||||
"chargers_conns":["*internal"],
|
||||
"rals_conns": ["*internal"],
|
||||
},
|
||||
|
||||
"sessions": {
|
||||
"enabled": true,
|
||||
"listen_bijson": ":7014",
|
||||
"suppliers_conns": ["*internal"],
|
||||
"resources_conns": ["*internal"],
|
||||
"attributes_conns": ["*internal"],
|
||||
"rals_conns": ["*internal"],
|
||||
"cdrs_conns": ["*internal"],
|
||||
"chargers_conns": ["*internal"],
|
||||
},
|
||||
|
||||
"apiers": {
|
||||
"enabled": true,
|
||||
"caches_conns":["conn1"],
|
||||
"scheduler_conns": ["*internal"],
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
"listen": {
|
||||
"rpc_json": ":7012",
|
||||
"rpc_gob": ":7013",
|
||||
"http": ":7080",
|
||||
},
|
||||
|
||||
"data_db": { // database used to store runtime data (eg: accounts, cdr stats)
|
||||
"db_type": "redis", // data_db type: <redis|mongo>
|
||||
"db_port": 6379, // data_db port to reach the database
|
||||
"db_name": "12", // data_db database name to connect to
|
||||
},
|
||||
|
||||
"stor_db": {
|
||||
"db_type":"*internal",
|
||||
},
|
||||
|
||||
|
||||
"rpc_conns": {
|
||||
"conn1": {
|
||||
"strategy": "*first",
|
||||
"conns": [{"address": "127.0.0.1:7012", "transport":"*json"}],
|
||||
},
|
||||
},
|
||||
|
||||
"attributes": {
|
||||
"enabled": true
|
||||
},
|
||||
|
||||
"rals": {
|
||||
"enabled": true,
|
||||
},
|
||||
|
||||
"schedulers": {
|
||||
"enabled": true,
|
||||
},
|
||||
|
||||
"chargers": {
|
||||
"enabled": true,
|
||||
"attributes_conns": ["*internal"],
|
||||
},
|
||||
|
||||
"thresholds": {
|
||||
"enabled": true,
|
||||
},
|
||||
|
||||
"suppliers": {
|
||||
"enabled": true,
|
||||
},
|
||||
|
||||
"stats": {
|
||||
"enabled": true,
|
||||
},
|
||||
|
||||
"resources": {
|
||||
"enabled": true,
|
||||
},
|
||||
|
||||
"cdrs": {
|
||||
"enabled": true,
|
||||
"chargers_conns":["*internal"],
|
||||
"rals_conns": ["*internal"],
|
||||
},
|
||||
|
||||
"sessions": {
|
||||
"enabled": true,
|
||||
"listen_bijson": ":7014",
|
||||
"suppliers_conns": ["*internal"],
|
||||
"resources_conns": ["*internal"],
|
||||
"attributes_conns": ["*internal"],
|
||||
"rals_conns": ["*internal"],
|
||||
"cdrs_conns": ["*internal"],
|
||||
"chargers_conns": ["*internal"],
|
||||
},
|
||||
|
||||
"apiers": {
|
||||
"enabled": true,
|
||||
"caches_conns":["conn1"],
|
||||
"scheduler_conns": ["*internal"],
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,100 +1,97 @@
|
||||
{
|
||||
// CGRateS Configuration file
|
||||
//
|
||||
|
||||
|
||||
"general": {
|
||||
"node_id": "ALL",
|
||||
"log_level": 7
|
||||
},
|
||||
|
||||
|
||||
"listen": {
|
||||
"rpc_json": ":6012",
|
||||
"rpc_gob": ":6013",
|
||||
"http": ":6080",
|
||||
},
|
||||
|
||||
"data_db": { // database used to store runtime data (eg: accounts, cdr stats)
|
||||
"db_type": "redis", // data_db type: <redis|mongo>
|
||||
"db_port": 6379, // data_db port to reach the database
|
||||
"db_name": "11", // data_db database name to connect to
|
||||
},
|
||||
|
||||
"stor_db": {
|
||||
"db_password": "CGRateS.org",
|
||||
},
|
||||
|
||||
|
||||
"rpc_conns": {
|
||||
"conn1": {
|
||||
"strategy": "*first",
|
||||
"conns": [{"address": "127.0.0.1:6012", "transport":"*json"}],
|
||||
},
|
||||
"rplConn": {
|
||||
"strategy": "*broadcast_sync",
|
||||
"conns": [{"address": "127.0.0.1:7012", "transport":"*json"}],
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
// CGRateS Configuration file
|
||||
//
|
||||
|
||||
|
||||
"attributes": {
|
||||
"enabled": true
|
||||
|
||||
"general": {
|
||||
"node_id": "ALL",
|
||||
"log_level": 7
|
||||
},
|
||||
|
||||
|
||||
"listen": {
|
||||
"rpc_json": ":6012",
|
||||
"rpc_gob": ":6013",
|
||||
"http": ":6080",
|
||||
},
|
||||
|
||||
"data_db": { // database used to store runtime data (eg: accounts, cdr stats)
|
||||
"db_type": "redis", // data_db type: <redis|mongo>
|
||||
"db_port": 6379, // data_db port to reach the database
|
||||
"db_name": "11", // data_db database name to connect to
|
||||
},
|
||||
|
||||
"stor_db": {
|
||||
"db_password": "CGRateS.org",
|
||||
},
|
||||
|
||||
|
||||
"rpc_conns": {
|
||||
"conn1": {
|
||||
"strategy": "*first",
|
||||
"conns": [{"address": "127.0.0.1:6012", "transport":"*json"}],
|
||||
},
|
||||
|
||||
"rals": {
|
||||
"enabled": true,
|
||||
},
|
||||
|
||||
"schedulers": {
|
||||
"enabled": true,
|
||||
},
|
||||
|
||||
"chargers": {
|
||||
"enabled": true,
|
||||
"attributes_conns": ["*internal"],
|
||||
},
|
||||
|
||||
"thresholds": {
|
||||
"enabled": true,
|
||||
},
|
||||
|
||||
"suppliers": {
|
||||
"enabled": true,
|
||||
},
|
||||
|
||||
"stats": {
|
||||
"enabled": true,
|
||||
},
|
||||
|
||||
"resources": {
|
||||
"enabled": true,
|
||||
},
|
||||
|
||||
"cdrs": {
|
||||
"enabled": true,
|
||||
"chargers_conns":["*internal"],
|
||||
"rals_conns": ["*internal"],
|
||||
},
|
||||
|
||||
"sessions": {
|
||||
"enabled": true,
|
||||
"listen_bijson": ":6014",
|
||||
"suppliers_conns": ["*internal"],
|
||||
"resources_conns": ["*internal"],
|
||||
"attributes_conns": ["*internal"],
|
||||
"rals_conns": ["*internal"],
|
||||
"chargers_conns": ["*internal"],
|
||||
"cdrs_conns": ["*internal"],
|
||||
},
|
||||
|
||||
"apiers": {
|
||||
"enabled": true,
|
||||
"caches_conns":["conn1"],
|
||||
"scheduler_conns": ["*internal"],
|
||||
},
|
||||
|
||||
"rplConn": {
|
||||
"strategy": "*broadcast_sync",
|
||||
"conns": [{"address": "127.0.0.1:7012", "transport":"*json"}],
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
"attributes": {
|
||||
"enabled": true
|
||||
},
|
||||
|
||||
"rals": {
|
||||
"enabled": true,
|
||||
},
|
||||
|
||||
"schedulers": {
|
||||
"enabled": true,
|
||||
},
|
||||
|
||||
"chargers": {
|
||||
"enabled": true,
|
||||
"attributes_conns": ["*internal"],
|
||||
},
|
||||
|
||||
"thresholds": {
|
||||
"enabled": true,
|
||||
},
|
||||
|
||||
"suppliers": {
|
||||
"enabled": true,
|
||||
},
|
||||
|
||||
"stats": {
|
||||
"enabled": true,
|
||||
},
|
||||
|
||||
"resources": {
|
||||
"enabled": true,
|
||||
},
|
||||
|
||||
"cdrs": {
|
||||
"enabled": true,
|
||||
"chargers_conns":["*internal"],
|
||||
"rals_conns": ["*internal"],
|
||||
},
|
||||
|
||||
"sessions": {
|
||||
"enabled": true,
|
||||
"listen_bijson": ":6014",
|
||||
"suppliers_conns": ["*internal"],
|
||||
"resources_conns": ["*internal"],
|
||||
"attributes_conns": ["*internal"],
|
||||
"rals_conns": ["*internal"],
|
||||
"chargers_conns": ["*internal"],
|
||||
"cdrs_conns": ["*internal"],
|
||||
},
|
||||
|
||||
"apiers": {
|
||||
"enabled": true,
|
||||
"caches_conns":["conn1"],
|
||||
"scheduler_conns": ["*internal"],
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ func TestCDRsPostFailoverIT(t *testing.T) {
|
||||
switch *dbType {
|
||||
case utils.MetaInternal:
|
||||
cdrsPostFailConfDIR = "cdrsv_failover_internal"
|
||||
case utils.MetaSQL:
|
||||
case utils.MetaMySQL:
|
||||
cdrsPostFailConfDIR = "cdrsv_failover_mysql"
|
||||
case utils.MetaMongo:
|
||||
cdrsPostFailConfDIR = "cdrsv_failover_mongo"
|
||||
|
||||
Reference in New Issue
Block a user