From 5c0129ef86dc8f603142efc85bef494eac7e2736 Mon Sep 17 00:00:00 2001 From: porosnicuadrian Date: Fri, 16 Oct 2020 15:05:48 +0300 Subject: [PATCH] Added rmt_conns and rpl_conns fields in strodb AsMapInterface method --- config/stordbcfg_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config/stordbcfg_test.go b/config/stordbcfg_test.go index 612974fdf..ead96ca6d 100644 --- a/config/stordbcfg_test.go +++ b/config/stordbcfg_test.go @@ -206,6 +206,8 @@ func TestStorDbCfgAsMapInterface(t *testing.T) { "db_password": "", "string_indexed_fields": [], "prefix_indexed_fields":[], + "remote_conns": ["*conn1"], + "replication_conns": ["*conn1"], "opts": { "max_open_conns": 100, "max_idle_conns": 10, @@ -229,6 +231,8 @@ func TestStorDbCfgAsMapInterface(t *testing.T) { utils.DataDbPassCfg: "", utils.StringIndexedFieldsCfg: []string{}, utils.PrefixIndexedFieldsCfg: []string{}, + utils.RmtConnsCfg: []string{"*conn1"}, + utils.RplConnsCfg: []string{"*conn1"}, utils.OptsCfg: map[string]interface{}{ utils.MaxOpenConnsCfg: 100., utils.MaxIdleConnsCfg: 10., @@ -253,6 +257,10 @@ func TestStorDbCfgAsMapInterface(t *testing.T) { t.Errorf("Expected %+v \n, received %+v", eMap[utils.OptsCfg], rcv[utils.OptsCfg]) } else if !reflect.DeepEqual(eMap[utils.PrefixIndexedFieldsCfg], rcv[utils.PrefixIndexedFieldsCfg]) { t.Errorf("Expected %+v \n, received %+v", eMap[utils.PrefixIndexedFieldsCfg], rcv[utils.PrefixIndexedFieldsCfg]) + } else if !reflect.DeepEqual(eMap[utils.RmtConnsCfg], rcv[utils.RmtConnsCfg]) { + t.Errorf("Expected %+v \n, received %+v", eMap[utils.RmtConnsCfg], rcv[utils.RmtConnsCfg]) + } else if !reflect.DeepEqual(eMap[utils.RplConnsCfg], rcv[utils.RplConnsCfg]) { + t.Errorf("Expected %+v \n, received %+v", eMap[utils.RplConnsCfg], rcv[utils.RplConnsCfg]) } } }