mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Reflect test with prefix
This commit is contained in:
@@ -560,7 +560,7 @@ func TestAgReqAsNavigableMap2(t *testing.T) {
|
||||
dm := engine.NewDataManager(data)
|
||||
cfg, _ := config.NewDefaultCGRConfig()
|
||||
filterS := engine.NewFilterS(cfg, nil, nil, dm)
|
||||
agReq := newAgentRequest(nil, nil, nil, nil, "cgrates.org", "", filterS)
|
||||
agReq := newAgentRequest(nil, nil, nil, nil, nil, "cgrates.org", "", filterS)
|
||||
// populate request, emulating the way will be done in HTTPAgent
|
||||
agReq.CGRRequest.Set([]string{utils.ToR}, utils.VOICE, false, false)
|
||||
agReq.CGRRequest.Set([]string{utils.Account}, "1001", false, false)
|
||||
@@ -617,7 +617,7 @@ func TestAgReqFieldAsInterface(t *testing.T) {
|
||||
dm := engine.NewDataManager(data)
|
||||
cfg, _ := config.NewDefaultCGRConfig()
|
||||
filterS := engine.NewFilterS(cfg, nil, nil, dm)
|
||||
agReq := newAgentRequest(nil, nil, nil, nil, "cgrates.org", "", filterS)
|
||||
agReq := newAgentRequest(nil, nil, nil, nil, nil, "cgrates.org", "", filterS)
|
||||
// populate request, emulating the way will be done in HTTPAgent
|
||||
agReq.CGRAReq = config.NewNavigableMap(nil)
|
||||
agReq.CGRAReq.Set([]string{utils.Usage}, []*config.NMItem{{Data: 3 * time.Minute}}, false, false)
|
||||
|
||||
@@ -42,12 +42,12 @@ var (
|
||||
|
||||
var sTestsDNS = []func(t *testing.T){
|
||||
testDNSitResetDB,
|
||||
//testDNSitStartEngine,
|
||||
testDNSitStartEngine,
|
||||
testDNSitApierRpcConn,
|
||||
testDNSitTPFromFolder,
|
||||
testDNSitClntConn,
|
||||
//testDNSitClntNAPTRDryRun,
|
||||
//testDNSitClntNAPTRAttributes,
|
||||
testDNSitClntNAPTRDryRun,
|
||||
testDNSitClntNAPTRAttributes,
|
||||
testDNSitClntNAPTRSuppliers,
|
||||
testDNSitStopEngine,
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ package utils
|
||||
import (
|
||||
"net"
|
||||
"reflect"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
@@ -148,7 +149,8 @@ func TestGreaterThan(t *testing.T) {
|
||||
t.Error("should be not greater than")
|
||||
}
|
||||
if _, err := GreaterThan(struct{}{},
|
||||
map[string]interface{}{"a": "a"}, false); err == nil || err.Error() != "incomparable" {
|
||||
map[string]interface{}{"a": "a"}, false); err == nil ||
|
||||
!strings.HasPrefix(err.Error(), "incomparable") {
|
||||
t.Error(err)
|
||||
}
|
||||
if gte, err := GreaterThan(1.2, 1.2, true); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user