Add test for ApierV1.GetActionPlanIDs

This commit is contained in:
TeoV
2019-09-23 03:14:53 -04:00
committed by Dan Christian Bogos
parent 38c7b36b4c
commit 5d45c339a3
2 changed files with 15 additions and 0 deletions

View File

@@ -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)

View File

@@ -810,6 +810,7 @@ const (
ApierV1SetStorDBVersions = "ApierV1.SetStorDBVersions"
ApierV1GetAccountActionPlan = "ApierV1.GetAccountActionPlan"
ApierV1ComputeActionPlanIndexes = "ApierV1.ComputeActionPlanIndexes"
ApierV1GetActionPlanIDs = "ApierV1.GetActionPlanIDs"
)
const (