general_tests fixes

This commit is contained in:
alin104n
2017-05-15 15:56:01 +03:00
parent 6faeee47dd
commit e88cafc1ed
4 changed files with 8 additions and 5 deletions

View File

@@ -9,8 +9,8 @@ TOPUP_DATA_r,*topup,,,,*monetary,*out,,DATA_DEST,,,*unlimited,,5000000,10,false,
TOPUP_DATA_r,*topup,,,,*data,*out,,DATA_DEST,datar,,*unlimited,,50000000000,10,false,false,10
TOPUP_VOICE,*topup,,,,*voice,*out,,GERMANY_MOBILE,,,*unlimited,,50000,10,false,false,10
TOPUP_NEG,*topup,,,,*voice,*out,,GERMANY;!GERMANY_MOBILE,*zero1m,,*unlimited,,100,10,false,false,10
RPC,*cgr_rpc,"{""Address"": ""localhost:2013"",""Transport"":""*gob"",""Method"":""ApierV2.SetAccount"",""Attempts"":1,""Async"" :false,""Params"":{""Account"":""rpc"",""Tenant"":""cgrates.org""}}",,,,,,,,,,,,,,,
RPC,*cgr_rpc,"{""Address"": ""localhost:2013"",""Transport"":""gob"",""Method"":""ApierV2.SetAccount"",""Attempts"":1,""Async"" :false,""Params"":{""Account"":""rpc"",""Tenant"":""cgrates.org""}}",,,,,,,,,,,,,,,
DID,*debit,,,,*monetary,*out,,*any,,,*unlimited,*any,"{""Method"":""*incremental"",""Params"":{""Units"":1, ""Interval"":""month"",""Increment"":""day""}}",10.0,,,10.0
DID,*cdrlog,"{""action"":""^DID"",""prev_balance"":""BalanceValue""}",,,*monetary,*out,,*any,,,*unlimited,,,10.0,,,10.0
RPC_DEST,*cgr_rpc,"{""Address"": ""localhost:2013"",""Transport"":""*gob"",""Method"":""ApierV2.SetDestination"",""Attempts"":1,""Async"" :false,""Params"":{""Id"":""<<.Account.GetID>>"",""Prefixes"":[""1"",""2"",""3""]}}",,,,,,,,,,,,,,,
RPC_CDRSTATS,*cgr_rpc,"{""Address"": ""localhost:2013"",""Transport"":""*gob"",""Method"":""CDRStatsV1.AddQueue"",""Attempts"":1,""Async"" :false,""Params"":{""Id"":""qtest""}}",,,,,,,,,,,,,,,
RPC_DEST,*cgr_rpc,"{""Address"": ""localhost:2013"",""Transport"":""gob"",""Method"":""ApierV2.SetDestination"",""Attempts"":1,""Async"" :false,""Params"":{""Id"":""<<.Account.GetID>>"",""Prefixes"":[""1"",""2"",""3""]}}",,,,,,,,,,,,,,,
RPC_CDRSTATS,*cgr_rpc,"{""Address"": ""localhost:2013"",""Transport"":""gob"",""Method"":""CDRStatsV1.AddQueue"",""Attempts"":1,""Async"" :false,""Params"":{""Id"":""qtest""}}",,,,,,,,,,,,,,,
1 #ActionsTag[0] Action[1] ActionExtraParameters[2] Filter[3] BalanceTag[4] BalanceType[5] Directions[6] Categories[7] DestinationIds[8] RatingSubject[9] SharedGroup[10] ExpiryTime[11] TimingTags[12] Units[13] BalanceWeight[14] BalanceBlocker[15] BalanceDisabled[16] Weight[17]
9 TOPUP_DATA_r *topup *data *out DATA_DEST datar *unlimited 50000000000 10 false false 10
10 TOPUP_VOICE *topup *voice *out GERMANY_MOBILE *unlimited 50000 10 false false 10
11 TOPUP_NEG *topup *voice *out GERMANY;!GERMANY_MOBILE *zero1m *unlimited 100 10 false false 10
12 RPC *cgr_rpc {"Address": "localhost:2013","Transport":"*gob","Method":"ApierV2.SetAccount","Attempts":1,"Async" :false,"Params":{"Account":"rpc","Tenant":"cgrates.org"}} {"Address": "localhost:2013","Transport":"gob","Method":"ApierV2.SetAccount","Attempts":1,"Async" :false,"Params":{"Account":"rpc","Tenant":"cgrates.org"}}
13 DID *debit *monetary *out *any *unlimited *any {"Method":"*incremental","Params":{"Units":1, "Interval":"month","Increment":"day"}} 10.0 10.0
14 DID *cdrlog {"action":"^DID","prev_balance":"BalanceValue"} *monetary *out *any *unlimited 10.0 10.0
15 RPC_DEST *cgr_rpc {"Address": "localhost:2013","Transport":"*gob","Method":"ApierV2.SetDestination","Attempts":1,"Async" :false,"Params":{"Id":"<<.Account.GetID>>","Prefixes":["1","2","3"]}} {"Address": "localhost:2013","Transport":"gob","Method":"ApierV2.SetDestination","Attempts":1,"Async" :false,"Params":{"Id":"<<.Account.GetID>>","Prefixes":["1","2","3"]}}
16 RPC_CDRSTATS *cgr_rpc {"Address": "localhost:2013","Transport":"*gob","Method":"CDRStatsV1.AddQueue","Attempts":1,"Async" :false,"Params":{"Id":"qtest"}} {"Address": "localhost:2013","Transport":"gob","Method":"CDRStatsV1.AddQueue","Attempts":1,"Async" :false,"Params":{"Id":"qtest"}}

View File

@@ -201,6 +201,7 @@ func TestA1itDataSession1(t *testing.T) {
} else if rpl != utils.OK {
t.Errorf("Received reply: %s", rpl)
}
time.Sleep(time.Duration(20) * time.Millisecond)
var cdrs []*engine.ExternalCDR
req := utils.RPCCDRsFilter{RunIDs: []string{utils.META_DEFAULT}}
if err := a1rpc.Call("ApierV2.GetCdrs", req, &cdrs); err != nil {

View File

@@ -110,6 +110,7 @@ func TestCDRsOnExpHttpCdrReplication(t *testing.T) {
t.Fatal("Could not connect to rater: ", err.Error())
}
// ToDo: Fix cdr_http to be compatible with rest of processCdr methods
time.Sleep(time.Duration(20) * time.Millisecond)
var rcvedCdrs []*engine.ExternalCDR
if err := cdrsSlaveRpc.Call("ApierV2.GetCdrs",
utils.RPCCDRsFilter{CGRIDs: []string{testCdr1.CGRID}, RunIDs: []string{utils.META_DEFAULT}}, &rcvedCdrs); err != nil {

View File

@@ -219,7 +219,7 @@ func TestTpExecuteActionCgrRpc(t *testing.T) {
t.Errorf("Calling ExecuteAction got reply: %s", reply)
}
var acnt engine.Account
attrs := &utils.AttrGetAccount{Tenant: "cgrates.org", Account: "rpc"}
attrs := &utils.AttrGetAccount{Tenant: "cgrates.org", Account: "1013"}
if err := tpRPC.Call("ApierV2.GetAccount", attrs, &acnt); err != nil {
t.Error("Got error on ApierV2.GetAccount: ", err.Error())
}
@@ -237,7 +237,7 @@ func TestTpExecuteActionCgrRpcAcc(t *testing.T) {
t.Errorf("Calling ExecuteAction got reply: %s", reply)
}
var dests []*engine.Destination
attrs := &v2.AttrGetDestinations{DestinationIDs: []string{"1016"}}
attrs := &v2.AttrGetDestinations{DestinationIDs: []string{}}
if err := tpRPC.Call("ApierV2.GetDestinations", attrs, &dests); err != nil {
t.Error("Got error on ApierV2.GetDestinations: ", err.Error())
}
@@ -253,6 +253,7 @@ func TestTpExecuteActionCgrRpcCdrStats(t *testing.T) {
t.Errorf("Calling ExecuteAction got reply: %s", reply)
}
var queue engine.StatsQueue
time.Sleep(20 * time.Millisecond)
if err := tpRPC.Call("CDRStatsV1.GetQueue", "qtest", &queue); err != nil {
t.Error("Got error on CDRStatsV1.GetQueue: ", err.Error())
}