From 00cece89436eb73f06ef2e72812656a96f3f27ad Mon Sep 17 00:00:00 2001 From: Trial97 Date: Mon, 17 May 2021 17:09:07 +0300 Subject: [PATCH] Updated birpc library --- accounts/accounts_test.go | 6 ++---- ers/filejson_it_test.go | 3 +-- general_tests/session_nonereq_it_test.go | 1 - go.mod | 2 +- go.sum | 2 ++ 5 files changed, 6 insertions(+), 8 deletions(-) diff --git a/accounts/accounts_test.go b/accounts/accounts_test.go index 3e6f6db71..3ae398715 100644 --- a/accounts/accounts_test.go +++ b/accounts/accounts_test.go @@ -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)} diff --git a/ers/filejson_it_test.go b/ers/filejson_it_test.go index 6626919f4..0c9f1ace5 100644 --- a/ers/filejson_it_test.go +++ b/ers/filejson_it_test.go @@ -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", } diff --git a/general_tests/session_nonereq_it_test.go b/general_tests/session_nonereq_it_test.go index af7814fe3..4ab284147 100644 --- a/general_tests/session_nonereq_it_test.go +++ b/general_tests/session_nonereq_it_test.go @@ -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" diff --git a/go.mod b/go.mod index 06736e43a..b6e399b6d 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/go.sum b/go.sum index d14d28343..226b91d3f 100644 --- a/go.sum +++ b/go.sum @@ -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=