mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-14 20:59:53 +05:00
Test LCR for bundles
This commit is contained in:
@@ -85,17 +85,6 @@
|
||||
// "cdr_replication":[], // replicate the raw CDR to a number of servers
|
||||
},
|
||||
|
||||
|
||||
"cdrs": {
|
||||
"enabled": true, // start the CDR Server service: <true|false>
|
||||
// "extra_fields": [], // extra fields to store in CDRs for non-generic CDRs
|
||||
// "store_cdrs": true, // store cdrs in storDb
|
||||
"rater": "internal", // address where to reach the Rater for cost calculation, empty to disable functionality: <""|internal|x.y.z.y:1234>
|
||||
"cdrstats": "internal", // address where to reach the cdrstats service, empty to disable stats functionality<""|internal|x.y.z.y:1234>
|
||||
// "reconnects": 5, // number of reconnect attempts to rater or cdrs
|
||||
// "cdr_replication":[], // replicate the raw CDR to a number of servers
|
||||
},
|
||||
|
||||
"cdr_stats": {
|
||||
"enabled": true, // starts the cdrstats service: <true|false>
|
||||
// "queue_length": 50, // number of items in the stats buffer
|
||||
|
||||
@@ -392,4 +392,31 @@ func TestGetLCR(t *testing.T) {
|
||||
} else if !reflect.DeepEqual(eLcLcr.SupplierCosts, lcrLc.SupplierCosts) {
|
||||
t.Errorf("Expecting: %+v, received: %+v", eLcLcr.SupplierCosts[1], lcrLc.SupplierCosts[1])
|
||||
}
|
||||
/*
|
||||
bRif12 := &Balance{Value: 40, Weight: 10, DestinationId: dstDe.Id}
|
||||
bIvo12 := &Balance{Value: 60, Weight: 10, DestinationId: dstDe.Id}
|
||||
rif12sAccount := &Account{Id: utils.ConcatenatedKey(utils.OUT, "tenant12", "rif12"), BalanceMap: map[string]BalanceChain{MINUTES + OUTBOUND: BalanceChain{bRif12}}}
|
||||
ivo12sAccount := &Account{Id: utils.ConcatenatedKey(utils.OUT, "tenant12", "ivo12"), BalanceMap: map[string]BalanceChain{MINUTES + OUTBOUND: BalanceChain{bIvo12}}}
|
||||
for _, acnt := range []*Account{rif12sAccount, ivo12sAccount} {
|
||||
if err := accountingStorage.SetAccount(acnt); err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
}
|
||||
eLcLcr = &LCRCost{
|
||||
Entry: &LCREntry{DestinationId: utils.ANY, RPCategory: "call", Strategy: LCR_STRATEGY_LOWEST, Weight: 10.0},
|
||||
SupplierCosts: []*LCRSupplierCost{
|
||||
&LCRSupplierCost{Supplier: "*out:tenant12:call:ivo12", Cost: 0, Duration: 60 * time.Second},
|
||||
&LCRSupplierCost{Supplier: "*out:tenant12:call:rif12", Cost: 0.4, Duration: 60 * time.Second},
|
||||
&LCRSupplierCost{Supplier: "*out:tenant12:call:dan12", Cost: 0.6, Duration: 60 * time.Second},
|
||||
},
|
||||
}
|
||||
if err := rsponder.GetLCR(cdLowestCost, &lcrLc); err != nil {
|
||||
t.Error(err)
|
||||
} else if !reflect.DeepEqual(eLcLcr.Entry, lcrLc.Entry) {
|
||||
t.Errorf("Expecting: %+v, received: %+v", eLcLcr.Entry, lcrLc.Entry)
|
||||
|
||||
} else if !reflect.DeepEqual(eLcLcr.SupplierCosts, lcrLc.SupplierCosts) {
|
||||
t.Errorf("Expecting: %+v, received: %+v", eLcLcr.SupplierCosts[1], lcrLc.SupplierCosts[1])
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user