mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-19 22:28:45 +05:00
Add integration test for InternalDB in apier/v2/cdrs_it_test.go
This commit is contained in:
@@ -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)
|
||||
|
||||
76
data/conf/samples/cdrsv2internal/cgrates.json
Normal file
76
data/conf/samples/cdrsv2internal/cgrates.json
Normal 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"},
|
||||
],
|
||||
},
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user