mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-25 17:18:44 +05:00
Cover part of BiRPCCall in utils/coreutils.go
This commit is contained in:
committed by
Dan Christian Bogos
parent
4b1cff3bf9
commit
d6462f5df4
@@ -1610,3 +1610,35 @@ func TestMonthlyEstimated(t *testing.T) {
|
||||
t.Errorf("Expected %+v, received %+v", expectedTime, rcv)
|
||||
}
|
||||
}
|
||||
|
||||
func TestCoreUtilsBiRPCCallSplitErr(t *testing.T) {
|
||||
type Server struct{}
|
||||
var srv Server
|
||||
var clnt rpcclient.ClientConnector
|
||||
var args int
|
||||
var reply *int
|
||||
serviceMethod := "test.err.call"
|
||||
|
||||
expected := rpcclient.ErrUnsupporteServiceMethod
|
||||
err := BiRPCCall(srv, clnt, serviceMethod, args, reply)
|
||||
|
||||
if err == nil || err != expected {
|
||||
t.Errorf("\nReceived: <%v>, \nExpected: <%v>", err, expected)
|
||||
}
|
||||
}
|
||||
|
||||
func TestCoreUtilsBiRPCCallMethodNotValid(t *testing.T) {
|
||||
type Server struct{}
|
||||
var srv Server
|
||||
var clnt rpcclient.ClientConnector
|
||||
var args int
|
||||
var reply *int
|
||||
serviceMethod := "test.com"
|
||||
|
||||
expected := rpcclient.ErrUnsupporteServiceMethod
|
||||
err := BiRPCCall(srv, clnt, serviceMethod, args, reply)
|
||||
|
||||
if err == nil || err != expected {
|
||||
t.Errorf("\nReceived: <%v>, \nExpected: <%v>", err, expected)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -211,7 +211,7 @@ func (ms MapStorage) GetKeys(nested bool, nestedLimit int, prefix string) (keys
|
||||
prefix += NestingSep
|
||||
}
|
||||
if !nested {
|
||||
// this is a special case for the filter matching were we have the full map:
|
||||
// this is a special case for the filter matching where we have the full map:
|
||||
/*
|
||||
ms:=MapStorage{
|
||||
"*req":MapStorage{
|
||||
|
||||
Reference in New Issue
Block a user