Added and modified configs in order to fix integration tests

This commit is contained in:
porosnicuadrian
2021-07-27 16:51:22 +03:00
committed by Dan Christian Bogos
parent 4b9d28b80a
commit daa7c2e43e
8 changed files with 127 additions and 7 deletions

View File

@@ -53,11 +53,11 @@ func TestRPLateIT2(t *testing.T) {
// no need for a new config with *gob transport in this case
switch *dbType {
case utils.MetaInternal:
rpLateConfigDIR = "tutinternal"
rpLateConfigDIR = "processcdrs_late_internal"
case utils.MetaMySQL:
rpLateConfigDIR = "tutmysql"
rpLateConfigDIR = "processcdrs_late_mysql"
case utils.MetaMongo:
rpLateConfigDIR = "tutmongo"
rpLateConfigDIR = "processcdrs_late_mongo"
case utils.MetaPostgres:
t.SkipNow()
default:

View File

@@ -0,0 +1,40 @@
{
// CGRateS Configuration file
//
// Used in apier/v1/rating_profile_late_it_test
"data_db":{
"db_type": "*internal"
},
"stor_db": {
"db_type": "*internal"
},
"rals": {
"enabled": true,
},
"cdrs": {
"enabled": true,
"rals_conns": ["*localhost"],
"chargers_conns":["*internal"],
},
"chargers": {
"enabled": true,
"attributes_conns": ["*internal"],
},
"attributes": {
"enabled": true,
"apiers_conns": ["*internal"]
},
"apiers": {
"enabled": true,
},
}

View File

@@ -0,0 +1,43 @@
{
// CGRateS Configuration file
//
// Used in apier/v1/rating_profile_late_it_test
"data_db": {
"db_type": "mongo",
"db_name": "10",
"db_port": 27017,
},
"stor_db": {
"db_type": "mongo",
"db_name": "cgrates",
"db_port": 27017,
},
"rals": {
"enabled": true,
},
"cdrs": {
"enabled": true,
"rals_conns": ["*localhost"],
"chargers_conns":["*internal"],
},
"chargers": {
"enabled": true,
"attributes_conns": ["*internal"],
},
"attributes": {
"enabled": true,
"apiers_conns": ["*internal"]
},
"apiers": {
"enabled": true,
},
}

View File

@@ -0,0 +1,40 @@
{
// CGRateS Configuration file
//
// Used in apier/v1/rating_profile_late_it_test
"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": "10", // data_db database name to connect to
},
"stor_db": {
"db_password": "CGRateS.org",
},
"rals": {
"enabled": true,
},
"cdrs": {
"enabled": true,
"rals_conns": ["*localhost"],
"chargers_conns":["*internal"],
},
"chargers": {
"enabled": true,
"attributes_conns": ["*internal"],
},
"attributes": {
"enabled": true,
"apiers_conns": ["*internal"]
},
"apiers": {
"enabled": true,
}
}

View File

@@ -43,7 +43,6 @@
"cdrs": {
"enabled": true,
"chargers_conns":["*internal"],
"rals_conns": ["*internal"],
},

View File

@@ -46,7 +46,6 @@
"cdrs": {
"enabled": true,
"chargers_conns":["*internal"],
"rals_conns": ["*internal"],
},

View File

@@ -43,7 +43,6 @@
"cdrs": {
"enabled": true,
"chargers_conns":["*internal"],
"rals_conns": ["*internal"]
},

View File

@@ -205,7 +205,7 @@ func testbrodcastItGetCDRs(t *testing.T) {
cdrs[0].SetupTime = cdrs[0].SetupTime.UTC() // uniform time
cdrs[0].AnswerTime = cdrs[0].AnswerTime.UTC() // uniform time
if !reflect.DeepEqual(eCDR, cdrs[0]) {
t.Errorf("Expected: %s ,received: %s", utils.ToJSON(eCDR), utils.ToJSON(cdrs[0]))
t.Errorf("Expected: %s \n,received: %s", utils.ToJSON(eCDR), utils.ToJSON(cdrs[0]))
}
}