mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-16 13:49:53 +05:00
Added extra fields for DispatcherHost such as in RemoteHost in rpcconn.go
This commit is contained in:
committed by
Dan Christian Bogos
parent
89f9a9bffd
commit
d8a803db0b
@@ -23,6 +23,7 @@ import (
|
||||
"sort"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
)
|
||||
@@ -659,15 +660,23 @@ func TestLoadDispatcherHosts(t *testing.T) {
|
||||
eDispatcherHosts := &utils.TPDispatcherHost{
|
||||
TPid: testTPID,
|
||||
Tenant: "cgrates.org",
|
||||
ID: "ALL1",
|
||||
ID: "ALL",
|
||||
Conn: &utils.TPDispatcherHostConn{
|
||||
Address: "127.0.0.1:2012",
|
||||
Transport: utils.MetaJSON,
|
||||
TLS: true,
|
||||
Address: "127.0.0.1:6012",
|
||||
Transport: utils.MetaJSON,
|
||||
Synchronous: false,
|
||||
ConnectAttempts: 1,
|
||||
Reconnects: 3,
|
||||
ConnectTimeout: 2 * time.Minute,
|
||||
ReplyTimeout: 2 * time.Minute,
|
||||
TLS: true,
|
||||
ClientKey: "key2",
|
||||
ClientCertificate: "cert2",
|
||||
CaCertificate: "ca_cert2",
|
||||
},
|
||||
}
|
||||
|
||||
dphKey := utils.TenantID{Tenant: "cgrates.org", ID: "ALL1"}
|
||||
dphKey := utils.TenantID{Tenant: "cgrates.org", ID: "ALL"}
|
||||
if len(csvr.dispatcherHosts) != 1 {
|
||||
t.Fatalf("Failed to load DispatcherHosts: %v", len(csvr.dispatcherHosts))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user