Add integration test for InternalDB in apier/v2/cdrs_it_test.go

This commit is contained in:
TeoV
2019-12-04 09:41:23 -05:00
parent 51943dce7c
commit 107170f00d
2 changed files with 82 additions and 0 deletions

View File

@@ -84,6 +84,12 @@ func TestCDRsITMongo(t *testing.T) {
}
}
func TestCDRsITInternal(t *testing.T) {
cdrsConfDIR = "cdrsv2internal"
for _, stest := range sTestsCDRsIT {
t.Run(cdrsConfDIR, stest)
}
}
func testV2CDRsInitConfig(t *testing.T) {
var err error
cdrsCfgPath = path.Join(*dataDir, "conf", "samples", cdrsConfDIR)

View File

@@ -0,0 +1,76 @@
{
// CGRateS Configuration file
//
// Used in apier_local_tests
// Starts rater, cdrs and mediator connecting over internal channel
"general": {
"log_level": 7,
},
"stor_db": {
"db_type": "*internal", // stor database type to use: <mysql|postgres>
},
"rals": {
"enabled": true, // enable Rater service: <true|false>
"thresholds_conns": [
{"address": "127.0.0.1:2012", "transport":"*json"},
],
},
"scheduler": {
"enabled": true,
},
"cdrs": {
"enabled": true,
"attributes_conns":[
{"address": "*internal"},
],
"chargers_conns":[
{"address": "127.0.0.1:2012", "transport":"*json"},
],
"rals_conns": [
{"address": "127.0.0.1:2012", "transport":"*json"},
],
"stats_conns": [
{"address": "127.0.0.1:2012", "transport":"*json"},
],
"thresholds_conns": [
{"address": "127.0.0.1:2012", "transport":"*json"},
],
},
"attributes": {
"enabled": true,
},
"stats": {
"enabled": true,
"store_interval": "1s",
"thresholds_conns": [
{"address": "*internal"}
],
},
"thresholds": {
"enabled": true,
"store_interval": "1s",
},
"chargers": {
"enabled": true,
"attributes_conns": [
{"address": "*internal"},
],
},
"apier": {
"scheduler_conns": [ // connections to SchedulerS for reloads
{"address": "*internal"},
],
},
}