mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Updated integration tests
This commit is contained in:
committed by
Dan Christian Bogos
parent
b8437f4a7d
commit
fc2f7631bd
@@ -481,10 +481,7 @@ func (ar *AgentRequest) ParseField(
|
||||
// setCGRReply will set the aReq.cgrReply based on reply coming from upstream or error
|
||||
// returns error in case of reply not converting to NavigableMap
|
||||
func (ar *AgentRequest) setCGRReply(rply utils.NavigableMapper, err error) {
|
||||
ar.CGRReply = &utils.DataNode{
|
||||
Type: utils.NMMapType,
|
||||
Map: make(map[string]*utils.DataNode),
|
||||
}
|
||||
ar.CGRReply.Map = make(map[string]*utils.DataNode)
|
||||
var errMsg string
|
||||
if err != nil {
|
||||
errMsg = err.Error()
|
||||
|
||||
@@ -1489,7 +1489,7 @@ func testDiamItEmulateTerminate(t *testing.T) {
|
||||
attrSetBalance := utils.AttrSetBalance{
|
||||
Tenant: "cgrates.com",
|
||||
Account: "testDiamItEmulateTerminate",
|
||||
Value: float64(1) * float64(time.Hour),
|
||||
Value: float64(time.Hour),
|
||||
BalanceType: utils.MetaVoice,
|
||||
Balance: map[string]interface{}{
|
||||
utils.ID: "testDiamItEmulateTerminate",
|
||||
|
||||
@@ -261,7 +261,7 @@ func (da *DiameterAgent) handleMessage(c diam.Conn, m *diam.Message) {
|
||||
da.aReqsLck.Unlock()
|
||||
}()
|
||||
}
|
||||
cgrRplyNM := new(utils.DataNode)
|
||||
cgrRplyNM := &utils.DataNode{Type: utils.NMMapType, Map: map[string]*utils.DataNode{}}
|
||||
opts := utils.MapStorage{}
|
||||
rply := utils.NewOrderedNavigableMap() // share it among different processors
|
||||
var processed bool
|
||||
|
||||
@@ -195,7 +195,7 @@ func testDNSitClntNAPTRSuppliers(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
} else if len(rply.Answer) != 2 {
|
||||
t.Errorf("wrong number of records: %s", utils.ToIJSON(rply.Answer))
|
||||
t.Fatalf("wrong number of records: %s", utils.ToIJSON(rply.Answer))
|
||||
}
|
||||
if rply.Rcode != dns.RcodeSuccess {
|
||||
t.Errorf("failed to get an valid answer\n%v", rply)
|
||||
|
||||
@@ -79,7 +79,7 @@ func (ra *RadiusAgent) handleAuth(req *radigo.Packet) (rpl *radigo.Packet, err e
|
||||
dcdr := newRADataProvider(req) // dcdr will provide information from request
|
||||
rpl = req.Reply()
|
||||
rpl.Code = radigo.AccessAccept
|
||||
cgrRplyNM := &utils.DataNode{}
|
||||
cgrRplyNM := &utils.DataNode{Type: utils.NMMapType, Map: map[string]*utils.DataNode{}}
|
||||
rplyNM := utils.NewOrderedNavigableMap()
|
||||
opts := utils.MapStorage{}
|
||||
var processed bool
|
||||
@@ -124,7 +124,7 @@ func (ra *RadiusAgent) handleAcct(req *radigo.Packet) (rpl *radigo.Packet, err e
|
||||
dcdr := newRADataProvider(req) // dcdr will provide information from request
|
||||
rpl = req.Reply()
|
||||
rpl.Code = radigo.AccountingResponse
|
||||
cgrRplyNM := &utils.DataNode{}
|
||||
cgrRplyNM := &utils.DataNode{Type: utils.NMMapType, Map: map[string]*utils.DataNode{}}
|
||||
rplyNM := utils.NewOrderedNavigableMap()
|
||||
opts := utils.MapStorage{}
|
||||
var processed bool
|
||||
|
||||
@@ -303,7 +303,7 @@ func (sa *SIPAgent) handleMessage(sipMessage sipingo.Message, remoteHost string)
|
||||
}
|
||||
dp := utils.MapStorage(sipMessageIface)
|
||||
var processed bool
|
||||
cgrRplyNM := &utils.DataNode{}
|
||||
cgrRplyNM := &utils.DataNode{Type: utils.NMMapType, Map: map[string]*utils.DataNode{}}
|
||||
rplyNM := utils.NewOrderedNavigableMap()
|
||||
opts := utils.MapStorage{}
|
||||
reqVars := &utils.DataNode{
|
||||
|
||||
Reference in New Issue
Block a user