Add default charger in general_tests/cdrs_onlexp_it_test.go

This commit is contained in:
TeoV
2019-02-18 17:21:30 +02:00
parent d08f50ad26
commit e64a74f18b

View File

@@ -117,6 +117,20 @@ func TestCDRsOnExpHttpCdrReplication(t *testing.T) {
if err != nil {
t.Fatal("Could not connect to rater: ", err.Error())
}
//add a default charger
chargerProfile := &engine.ChargerProfile{
Tenant: "cgrates.org",
ID: "Default",
RunID: "*default",
AttributeIDs: []string{"*none"},
Weight: 20,
}
var result string
if err := cdrsMasterRpc.Call("ApierV1.SetChargerProfile", chargerProfile, &result); err != nil {
t.Error(err)
} else if result != utils.OK {
t.Error("Unexpected reply returned", result)
}
testCdr1 := &engine.CDR{
CGRID: utils.Sha1("httpjsonrpc1", time.Date(2013, 12, 7, 8, 42, 24, 0, time.UTC).String()),
ToR: utils.VOICE,