mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-24 08:38:45 +05:00
removed account direction from tests
This commit is contained in:
@@ -1052,7 +1052,7 @@ func TestApierGetAccountActionTriggers(t *testing.T) {
|
||||
return
|
||||
}
|
||||
var reply engine.ActionTriggers
|
||||
req := AttrAcntAction{Tenant: "cgrates.org", Account: "dan2", Direction: "*out"}
|
||||
req := AttrAcntAction{Tenant: "cgrates.org", Account: "dan2"}
|
||||
if err := rater.Call("ApierV1.GetAccountActionTriggers", req, &reply); err != nil {
|
||||
t.Error("Got error on ApierV1.GetAccountActionTimings: ", err.Error())
|
||||
} else if len(reply) != 1 || reply[0].ActionsId != "WARN_VIA_HTTP" {
|
||||
@@ -1067,14 +1067,14 @@ func TestApierRemAccountActionTriggers(t *testing.T) {
|
||||
}
|
||||
// Test first get so we can steal the id which we need to remove
|
||||
var reply engine.ActionTriggers
|
||||
req := AttrAcntAction{Tenant: "cgrates.org", Account: "dan2", Direction: "*out"}
|
||||
req := AttrAcntAction{Tenant: "cgrates.org", Account: "dan2"}
|
||||
if err := rater.Call("ApierV1.GetAccountActionTriggers", req, &reply); err != nil {
|
||||
t.Error("Got error on ApierV1.GetAccountActionTimings: ", err.Error())
|
||||
} else if len(reply) != 1 || reply[0].ActionsId != "WARN_VIA_HTTP" {
|
||||
t.Errorf("Unexpected action triggers received %v", reply)
|
||||
}
|
||||
var rmReply string
|
||||
rmReq := AttrRemAcntActionTriggers{Tenant: "cgrates.org", Account: "dan2", Direction: "*out", ActionTriggersId: reply[0].Id}
|
||||
rmReq := AttrRemAcntActionTriggers{Tenant: "cgrates.org", Account: "dan2", ActionTriggersId: reply[0].Id}
|
||||
if err := rater.Call("ApierV1.RemAccountActionTriggers", rmReq, &rmReply); err != nil {
|
||||
t.Error("Got error on ApierV1.RemActionTiming: ", err.Error())
|
||||
} else if rmReply != OK {
|
||||
@@ -1115,7 +1115,7 @@ func TestApierGetAccountActionPlan(t *testing.T) {
|
||||
return
|
||||
}
|
||||
var reply []*AccountActionTiming
|
||||
req := AttrAcntAction{Tenant: "cgrates.org", Account: "dan7", Direction: "*out"}
|
||||
req := AttrAcntAction{Tenant: "cgrates.org", Account: "dan7"}
|
||||
if err := rater.Call("ApierV1.GetAccountActionPlan", req, &reply); err != nil {
|
||||
t.Error("Got error on ApierV1.GetAccountActionPlan: ", err.Error())
|
||||
} else if len(reply) != 1 {
|
||||
@@ -1133,14 +1133,14 @@ func TestApierRemActionTiming(t *testing.T) {
|
||||
return
|
||||
}
|
||||
var rmReply string
|
||||
rmReq := AttrRemActionTiming{ActionPlanId: "ATMS_1", Tenant: "cgrates.org", Account: "dan4", Direction: "*out"}
|
||||
rmReq := AttrRemActionTiming{ActionPlanId: "ATMS_1", Tenant: "cgrates.org", Account: "dan4"}
|
||||
if err := rater.Call("ApierV1.RemActionTiming", rmReq, &rmReply); err != nil {
|
||||
t.Error("Got error on ApierV1.RemActionTiming: ", err.Error())
|
||||
} else if rmReply != OK {
|
||||
t.Error("Unexpected answer received", rmReply)
|
||||
}
|
||||
var reply []*AccountActionTiming
|
||||
req := AttrAcntAction{Tenant: "cgrates.org", Account: "dan4", Direction: "*out"}
|
||||
req := AttrAcntAction{Tenant: "cgrates.org", Account: "dan4"}
|
||||
if err := rater.Call("ApierV1.GetAccountActionPlan", req, &reply); err != nil {
|
||||
t.Error("Got error on ApierV1.GetAccountActionPlan: ", err.Error())
|
||||
} else if len(reply) != 0 {
|
||||
|
||||
Reference in New Issue
Block a user