mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-24 08:38:45 +05:00
Add websockets in external libs script, small local tests modification
This commit is contained in:
@@ -217,7 +217,7 @@ func TestApierTPTiming(t *testing.T) {
|
||||
// Test getIds
|
||||
var rplyTmIds []string
|
||||
expectedTmIds := []string{"ALWAYS", "ASAP"}
|
||||
if err := rater.Call("ApierV1.GetTPTimingIds", AttrGetTPTimingIds{tmAlways.TPid, utils.Paginator{Page: 0, ItemsPerPage: 0, SearchTerm: ""}}, &rplyTmIds); err != nil {
|
||||
if err := rater.Call("ApierV1.GetTPTimingIds", AttrGetTPTimingIds{tmAlways.TPid, utils.Paginator{}}, &rplyTmIds); err != nil {
|
||||
t.Error("Calling ApierV1.GetTPTimingIds, got error: ", err.Error())
|
||||
} else if !reflect.DeepEqual(expectedTmIds, rplyTmIds) {
|
||||
t.Errorf("Calling ApierV1.GetTPTimingIds expected: %v, received: %v", expectedTmIds, rplyTmIds)
|
||||
@@ -325,7 +325,7 @@ func TestApierTPRate(t *testing.T) {
|
||||
// Test getIds
|
||||
var rplyRtIds []string
|
||||
expectedRtIds := []string{"RT_FS_USERS"}
|
||||
if err := rater.Call("ApierV1.GetTPRateIds", AttrGetTPRateIds{rt.TPid, utils.Paginator{Page: 0, ItemsPerPage: 0, SearchTerm: ""}}, &rplyRtIds); err != nil {
|
||||
if err := rater.Call("ApierV1.GetTPRateIds", AttrGetTPRateIds{rt.TPid, utils.Paginator{}}, &rplyRtIds); err != nil {
|
||||
t.Error("Calling ApierV1.GetTPRateIds, got error: ", err.Error())
|
||||
} else if !reflect.DeepEqual(expectedRtIds, rplyRtIds) {
|
||||
t.Errorf("Calling ApierV1.GetTPDestinationIds expected: %v, received: %v", expectedRtIds, rplyRtIds)
|
||||
@@ -382,7 +382,7 @@ func TestApierTPDestinationRate(t *testing.T) {
|
||||
// Test getIds
|
||||
var rplyDrIds []string
|
||||
expectedDrIds := []string{"DR_FREESWITCH_USERS"}
|
||||
if err := rater.Call("ApierV1.GetTPDestinationRateIds", AttrTPDestinationRateIds{dr.TPid, utils.Paginator{Page: 0, ItemsPerPage: 0, SearchTerm: ""}}, &rplyDrIds); err != nil {
|
||||
if err := rater.Call("ApierV1.GetTPDestinationRateIds", AttrTPDestinationRateIds{dr.TPid, utils.Paginator{}}, &rplyDrIds); err != nil {
|
||||
t.Error("Calling ApierV1.GetTPDestinationRateIds, got error: ", err.Error())
|
||||
} else if !reflect.DeepEqual(expectedDrIds, rplyDrIds) {
|
||||
t.Errorf("Calling ApierV1.GetTPDestinationRateIds expected: %v, received: %v", expectedDrIds, rplyDrIds)
|
||||
@@ -436,7 +436,7 @@ func TestApierTPRatingPlan(t *testing.T) {
|
||||
// Test getIds
|
||||
var rplyRpIds []string
|
||||
expectedRpIds := []string{"RETAIL1"}
|
||||
if err := rater.Call("ApierV1.GetTPRatingPlanIds", AttrGetTPRatingPlanIds{rp.TPid, utils.Paginator{Page: 0, ItemsPerPage: 0, SearchTerm: ""}}, &rplyRpIds); err != nil {
|
||||
if err := rater.Call("ApierV1.GetTPRatingPlanIds", AttrGetTPRatingPlanIds{rp.TPid, utils.Paginator{}}, &rplyRpIds); err != nil {
|
||||
t.Error("Calling ApierV1.GetTPRatingPlanIds, got error: ", err.Error())
|
||||
} else if !reflect.DeepEqual(expectedRpIds, rplyRpIds) {
|
||||
t.Errorf("Calling ApierV1.GetTPRatingPlanIds expected: %v, received: %v", expectedRpIds, rplyRpIds)
|
||||
@@ -1340,8 +1340,8 @@ func TestGetCallCostLog(t *testing.T) {
|
||||
}
|
||||
attrs.CgrId = "dummyid"
|
||||
attrs.RunId = "default"
|
||||
if err := rater.Call("ApierV1.GetCallCostLog", attrs, &cc); err == nil || err.Error() != "SERVER_ERROR:Record Not Found" {
|
||||
t.Error("ApierV1.GetCallCostLog: should return NOT_FOUND")
|
||||
if err := rater.Call("ApierV1.GetCallCostLog", attrs, &cc); err == nil || err.Error() != "SERVER_ERROR:record not found" {
|
||||
t.Error("ApierV1.GetCallCostLog: should return NOT_FOUND, got: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,4 +14,5 @@ go get -u -v github.com/cgrates/gorm
|
||||
go get -u -v github.com/gorhill/cronexpr
|
||||
go get -u -v github.com/cgrates/kamevapi
|
||||
go get -u -v github.com/DisposaBoy/JsonConfigReader
|
||||
go get -u -v golang.org/x/net/websocket
|
||||
|
||||
|
||||
Reference in New Issue
Block a user