mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-15 21:29:52 +05:00
Add test for ApierV1.GetActionPlanIDs
This commit is contained in:
committed by
Dan Christian Bogos
parent
38c7b36b4c
commit
5d45c339a3
@@ -57,6 +57,7 @@ var sTestsAPIer = []func(t *testing.T){
|
||||
testAPIerGetRatingPlanCost,
|
||||
testAPIerGetRatingPlanCost2,
|
||||
testAPIerGetRatingPlanCost3,
|
||||
testAPIerGetActionPlanIDs,
|
||||
testAPIerKillEngine,
|
||||
}
|
||||
|
||||
@@ -270,6 +271,19 @@ func testAPIerGetRatingPlanCost3(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func testAPIerGetActionPlanIDs(t *testing.T) {
|
||||
var reply []string
|
||||
if err := apierRPC.Call(utils.ApierV1GetActionPlanIDs,
|
||||
utils.TenantArgWithPaginator{TenantArg: utils.TenantArg{Tenant: "cgrates.org"}},
|
||||
&reply); err != nil {
|
||||
t.Error(err)
|
||||
} else if len(reply) != 1 {
|
||||
t.Errorf("Expected: 1 , received: <%+v>", len(reply))
|
||||
}else if reply[0]!="AP_PACKAGE_10"{
|
||||
t.Errorf("Expected: AP_PACKAGE_10 , received: <%+v>", reply[0])
|
||||
}
|
||||
}
|
||||
|
||||
func testAPIerKillEngine(t *testing.T) {
|
||||
if err := engine.KillEngine(*waitRater); err != nil {
|
||||
t.Error(err)
|
||||
|
||||
@@ -810,6 +810,7 @@ const (
|
||||
ApierV1SetStorDBVersions = "ApierV1.SetStorDBVersions"
|
||||
ApierV1GetAccountActionPlan = "ApierV1.GetAccountActionPlan"
|
||||
ApierV1ComputeActionPlanIndexes = "ApierV1.ComputeActionPlanIndexes"
|
||||
ApierV1GetActionPlanIDs = "ApierV1.GetActionPlanIDs"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
Reference in New Issue
Block a user