Updated birpc library

This commit is contained in:
Trial97
2021-05-17 17:09:07 +03:00
committed by Dan Christian Bogos
parent 746c750189
commit 00cece8943
5 changed files with 6 additions and 8 deletions

View File

@@ -1331,14 +1331,12 @@ func TestV1DebitAbstractsEventCharges(t *testing.T) {
// set the internal AttributeS within connMngr
attrSConn := make(chan birpc.ClientConnector, 1)
attrSrv, _ := birpc.NewService(engine.NewAttributeService(dm, fltrS, cfg), utils.AttributeSv1, true)
attrSrv.UpdateMethodName(func(key string) (newKey string) { return strings.TrimPrefix(key, utils.V1Prfx) }) // update the name of the functions
attrSrv, _ := birpc.NewServiceWithMethodsRename(engine.NewAttributeService(dm, fltrS, cfg), utils.AttributeSv1, true, func(key string) (newKey string) { return strings.TrimPrefix(key, utils.V1Prfx) }) // update the name of the functions
attrSConn <- attrSrv
cfg.AccountSCfg().AttributeSConns = []string{utils.ConcatenatedKey(utils.MetaInternal, utils.MetaAttributes)}
// Set the internal rateS within connMngr
rateSConn := make(chan birpc.ClientConnector, 1)
rateSrv, _ := birpc.NewService(rates.NewRateS(cfg, fltrS, dm), utils.RateSv1, true)
rateSrv.UpdateMethodName(func(key string) (newKey string) { return strings.TrimPrefix(key, utils.V1Prfx) }) // update the name of the functions
rateSrv, _ := birpc.NewServiceWithMethodsRename(rates.NewRateS(cfg, fltrS, dm), utils.RateSv1, true, func(key string) (newKey string) { return strings.TrimPrefix(key, utils.V1Prfx) }) // update the name of the functions
rateSConn <- rateSrv
cfg.AccountSCfg().RateSConns = []string{utils.ConcatenatedKey(utils.MetaInternal, utils.MetaRateS)}

View File

@@ -27,7 +27,6 @@ import (
"testing"
"time"
v2 "github.com/cgrates/cgrates/apier/v2"
"github.com/cgrates/cgrates/engine"
"github.com/cgrates/cgrates/config"
@@ -145,7 +144,7 @@ func testJSONAddData(t *testing.T) {
t.Error("Unexpected reply returned", reply)
}
attrSetAcnt := v2.AttrSetAccount{
attrSetAcnt := apis.AttrSetAccount{
Tenant: "cgrates.org",
Account: "voiceAccount",
}

View File

@@ -26,7 +26,6 @@ import (
"testing"
"time"
v1 "github.com/cgrates/cgrates/apier/v1"
"github.com/cgrates/cgrates/config"
"github.com/cgrates/cgrates/engine"
"github.com/cgrates/cgrates/sessions"

2
go.mod
View File

@@ -17,7 +17,7 @@ require (
github.com/cenkalti/rpc2 v0.0.0-20210220005819-4a29bc83afe1
github.com/cgrates/aringo v0.0.0-20201113143849-3b299e4e636d
github.com/cgrates/baningo v0.0.0-20210413080722-004ffd5e429f
github.com/cgrates/birpc v1.3.1-0.20210413080448-f81834a37fd3
github.com/cgrates/birpc v1.3.1-0.20210517105830-c9cc855bcec5
github.com/cgrates/cron v0.0.0-20201022095836-3522d5b72c70
github.com/cgrates/fsock v0.0.0-20191107070144-e7a331109df7
github.com/cgrates/kamevapi v0.0.0-20191001125829-7dbc3ad58817

2
go.sum
View File

@@ -87,6 +87,8 @@ github.com/cgrates/baningo v0.0.0-20210413080722-004ffd5e429f h1:dCp5BflGB8I8wlh
github.com/cgrates/baningo v0.0.0-20210413080722-004ffd5e429f/go.mod h1:3SwVROaS1Iml5lqEhj0gRhDRtmbBgypZpKcEkVTSleU=
github.com/cgrates/birpc v1.3.1-0.20210413080448-f81834a37fd3 h1:AJrOcYMIQ/8X1i/kfqwOkQghxfJcPUloSRfK0n38JhI=
github.com/cgrates/birpc v1.3.1-0.20210413080448-f81834a37fd3/go.mod h1:z/PmNnDPqSQALedKJv5T8+eXIq6XHa9J0St1YsvAVns=
github.com/cgrates/birpc v1.3.1-0.20210517105830-c9cc855bcec5 h1:Pn9VGy13xCMm3zW5QaUCoIa3dsPbTIajgnCt4rcXJ2w=
github.com/cgrates/birpc v1.3.1-0.20210517105830-c9cc855bcec5/go.mod h1:z/PmNnDPqSQALedKJv5T8+eXIq6XHa9J0St1YsvAVns=
github.com/cgrates/cron v0.0.0-20201022095836-3522d5b72c70 h1:/O+Dr12jcizDiCoIG2oK6wyE1pNRVQc62Wz+TfPWDhU=
github.com/cgrates/cron v0.0.0-20201022095836-3522d5b72c70/go.mod h1:I9cUDn/uzkakr0hmYTjXkQqf6wagg44L2p01gSYRRz0=
github.com/cgrates/fsock v0.0.0-20191107070144-e7a331109df7 h1:dxtBWRAr62vRRKkExmJZ0u1EbCw/y0vOkSfdFND5qXw=