Added rmt_conns and rpl_conns fields in strodb AsMapInterface method

This commit is contained in:
porosnicuadrian
2020-10-16 15:05:48 +03:00
committed by Dan Christian Bogos
parent f15d983334
commit 5c0129ef86

View File

@@ -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])
}
}
}