Small local test fixup following AttrGetTPRatingPlan modifications

This commit is contained in:
DanB
2014-10-09 14:22:30 +02:00
parent cfa42ac692
commit c744cd5ef2

View File

@@ -426,13 +426,13 @@ func TestApierTPRatingPlan(t *testing.T) {
}
// Test get
var rplyRpTst *utils.TPRatingPlan
if err := rater.Call("ApierV1.GetTPRatingPlan", AttrGetTPRatingPlan{rpTst.TPid, rpTst.RatingPlanId}, &rplyRpTst); err != nil {
if err := rater.Call("ApierV1.GetTPRatingPlan", AttrGetTPRatingPlan{TPid: rpTst.TPid, RatingPlanId: rpTst.RatingPlanId}, &rplyRpTst); err != nil {
t.Error("Calling ApierV1.GetTPRatingPlan, got error: ", err.Error())
} else if !reflect.DeepEqual(rpTst, rplyRpTst) {
t.Errorf("Calling ApierV1.GetTPRatingPlan expected: %v, received: %v", rpTst, rplyRpTst)
}
// Test remove
if err := rater.Call("ApierV1.RemTPRatingPlan", AttrGetTPRatingPlan{rpTst.TPid, rpTst.RatingPlanId}, &reply); err != nil {
if err := rater.Call("ApierV1.RemTPRatingPlan", AttrGetTPRatingPlan{TPid: rpTst.TPid, RatingPlanId: rpTst.RatingPlanId}, &reply); err != nil {
t.Error("Calling ApierV1.RemTPRatingPlan, got error: ", err.Error())
} else if reply != "OK" {
t.Error("Calling ApierV1.RemTPRatingPlan received: ", reply)