mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-19 22:28:45 +05:00
Fixed and sync process_match_rt test/config
This commit is contained in:
committed by
Dan Christian Bogos
parent
dcdfabb5f6
commit
9ef188e3eb
@@ -5,22 +5,21 @@
|
||||
|
||||
"general": {
|
||||
"log_level": 7,
|
||||
"reply_timeout": "50s"
|
||||
"reply_timeout": "50s",
|
||||
},
|
||||
|
||||
|
||||
"listen": {
|
||||
"rpc_json": ":2012",
|
||||
"rpc_gob": ":2013",
|
||||
"http": ":2080"
|
||||
"http": ":2080",
|
||||
},
|
||||
|
||||
|
||||
"data_db": {
|
||||
"db_type": "*internal"
|
||||
},
|
||||
|
||||
|
||||
|
||||
"stor_db": {
|
||||
"db_type": "*internal"
|
||||
},
|
||||
@@ -30,6 +29,7 @@
|
||||
"id": "*default",
|
||||
"enabled": true,
|
||||
"tenant": "cgrates.org",
|
||||
"lockfile_path": ".cgr.lck",
|
||||
"tp_in_dir": "/usr/share/cgrates/tariffplans/loadRateTest",
|
||||
"tp_out_dir": "",
|
||||
},
|
||||
@@ -47,6 +47,7 @@
|
||||
"ees_conns": ["conn1"]
|
||||
},
|
||||
|
||||
|
||||
"chargers": {
|
||||
"enabled": true,
|
||||
"attributes_conns": ["*internal"],
|
||||
@@ -61,6 +62,7 @@
|
||||
|
||||
"accounts": {
|
||||
"enabled": true,
|
||||
"rates_conns": ["*internal"],
|
||||
},
|
||||
|
||||
"rpc_conns": {
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
{
|
||||
// CGRateS Configuration file
|
||||
//
|
||||
|
||||
|
||||
"general": {
|
||||
"log_level": 7,
|
||||
"reply_timeout": "30s",
|
||||
"reply_timeout": "50s",
|
||||
},
|
||||
|
||||
|
||||
@@ -14,7 +15,6 @@
|
||||
"http": ":2080",
|
||||
},
|
||||
|
||||
|
||||
"data_db": {
|
||||
"db_type": "mongo",
|
||||
"db_name": "10",
|
||||
@@ -27,11 +27,13 @@
|
||||
"db_name": "cgrates",
|
||||
"db_port": 27017,
|
||||
},
|
||||
|
||||
"loaders": [
|
||||
{
|
||||
"id": "*default",
|
||||
"enabled": true,
|
||||
"tenant": "cgrates.org",
|
||||
"lockfile_path": ".cgr.lck",
|
||||
"tp_in_dir": "/usr/share/cgrates/tariffplans/loadRateTest",
|
||||
"tp_out_dir": "",
|
||||
},
|
||||
@@ -49,6 +51,7 @@
|
||||
"ees_conns": ["conn1"]
|
||||
},
|
||||
|
||||
|
||||
"chargers": {
|
||||
"enabled": true,
|
||||
"attributes_conns": ["*internal"],
|
||||
@@ -63,6 +66,7 @@
|
||||
|
||||
"accounts": {
|
||||
"enabled": true,
|
||||
"rates_conns": ["*internal"],
|
||||
},
|
||||
|
||||
"rpc_conns": {
|
||||
@@ -72,5 +76,4 @@
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
"accounts": {
|
||||
"enabled": true,
|
||||
"rates_conns": ["*internal"],
|
||||
"rates_conns": ["*localhost"],
|
||||
},
|
||||
|
||||
"rpc_conns": {
|
||||
|
||||
@@ -41,11 +41,11 @@ var (
|
||||
testLdPrMatchAcLoadConfig,
|
||||
testLdPrMatchAcResetDataDB,
|
||||
testLdPrMatchAcResetStorDb,
|
||||
// testLdPrMatchAcStartEngine,
|
||||
testLdPrMatchAcStartEngine,
|
||||
testLdPrMatchAcRPCConn,
|
||||
testLdPrMatchAcLoadTP,
|
||||
testLdPrMatchAcCDRSProcessEvent,
|
||||
// testLdPrMatchAcStopCgrEngine,
|
||||
testLdPrMatchAcStopCgrEngine,
|
||||
}
|
||||
)
|
||||
|
||||
@@ -102,11 +102,15 @@ func testLdPrMatchAcRPCConn(t *testing.T) {
|
||||
}
|
||||
|
||||
func testLdPrMatchAcLoadTP(t *testing.T) {
|
||||
caching := utils.MetaReload
|
||||
if testLdPrMatchAcCfgDir == "ld_process_match_rt_internal" {
|
||||
caching = utils.MetaNone
|
||||
}
|
||||
var reply string
|
||||
if err := testLdPrMatchAcRPC.Call(context.Background(), utils.LoaderSv1Load,
|
||||
&loaders.ArgsProcessFolder{
|
||||
StopOnError: true,
|
||||
Caching: utils.StringPointer(utils.MetaReload),
|
||||
Caching: utils.StringPointer(caching),
|
||||
}, &reply); err != nil {
|
||||
t.Error(err)
|
||||
} else if reply != utils.OK {
|
||||
@@ -125,9 +129,9 @@ func testLdPrMatchAcCDRSProcessEvent(t *testing.T) {
|
||||
utils.AccountField: "1001",
|
||||
utils.Subject: "1001",
|
||||
utils.Destination: "1002",
|
||||
utils.Usage: time.Minute,
|
||||
},
|
||||
APIOpts: map[string]interface{}{
|
||||
utils.MetaUsage: 2 * time.Minute,
|
||||
utils.OptsRateS: false,
|
||||
utils.OptsCDRsExport: false,
|
||||
utils.OptsAccountS: true,
|
||||
|
||||
Reference in New Issue
Block a user