mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Fixed typo in config_defaults.go and updated tests for config
This commit is contained in:
committed by
Dan Christian Bogos
parent
89c4eecfff
commit
54ebc68ab3
@@ -935,7 +935,7 @@ const CGRATES_CFG_JSON = `
|
||||
{"tag": "Address", "path": "Address", "type": "*variable", "value": "~*req.2"},
|
||||
{"tag": "Transport", "path": "Transport", "type": "*variable", "value": "~*req.3"},
|
||||
{"tag": "Synchronous", "path": "Synchronous", "type": "*variable", "value":"~*req.4"},
|
||||
{"tag": "ConnectAttemmpts", "path": "ConnectAttempts", "type": "*variable", "value":"~*req.5"},
|
||||
{"tag": "ConnectAttempts", "path": "ConnectAttempts", "type": "*variable", "value":"~*req.5"},
|
||||
{"tag": "Reconnects", "path": "Reconnects", "type": "*variable", "value":"~*req.6"},
|
||||
{"tag": "ConnectTimeout", "path": "ConnectTimeout", "type": "*variable", "value":"~*req.7"},
|
||||
{"tag": "ReplyTimeout", "path": "ReplyTimeout", "type": "*variable", "value":"~*req.8"},
|
||||
|
||||
@@ -1497,10 +1497,51 @@ func TestDfLoaderJsonCfg(t *testing.T) {
|
||||
Path: utils.StringPointer("Transport"),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~*req.3")},
|
||||
{Tag: utils.StringPointer("Synchronous"),
|
||||
Path: utils.StringPointer("Synchronous"),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~*req.4"),
|
||||
},
|
||||
{Tag: utils.StringPointer("ConnectAttempts"),
|
||||
Path: utils.StringPointer("ConnectAttempts"),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~*req.5"),
|
||||
},
|
||||
{Tag: utils.StringPointer("Reconnects"),
|
||||
Path: utils.StringPointer("Reconnects"),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~*req.6"),
|
||||
},
|
||||
{Tag: utils.StringPointer("ConnectTimeout"),
|
||||
Path: utils.StringPointer("ConnectTimeout"),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~*req.7"),
|
||||
},
|
||||
{Tag: utils.StringPointer("ReplyTimeout"),
|
||||
Path: utils.StringPointer("ReplyTimeout"),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~*req.8"),
|
||||
},
|
||||
{Tag: utils.StringPointer("TLS"),
|
||||
Path: utils.StringPointer("TLS"),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~*req.4")},
|
||||
Value: utils.StringPointer("~*req.9"),
|
||||
},
|
||||
{Tag: utils.StringPointer("ClientKey"),
|
||||
Path: utils.StringPointer("ClientKey"),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~*req.10"),
|
||||
},
|
||||
{Tag: utils.StringPointer("ClientCertificate"),
|
||||
Path: utils.StringPointer("ClientCertificate"),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~*req.11"),
|
||||
},
|
||||
{Tag: utils.StringPointer("CaCertificate"),
|
||||
Path: utils.StringPointer("CaCertificate"),
|
||||
Type: utils.StringPointer(utils.MetaVariable),
|
||||
Value: utils.StringPointer("~*req.12"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -1513,7 +1554,7 @@ func TestDfLoaderJsonCfg(t *testing.T) {
|
||||
if cfg, err := dfCgrJSONCfg.LoaderJsonCfg(); err != nil {
|
||||
t.Error(err)
|
||||
} else if !reflect.DeepEqual(eCfg, cfg) {
|
||||
t.Errorf("Expecting: %s, received: %s ",
|
||||
t.Errorf("Expecting: %s \n but received \n Received: %s ",
|
||||
utils.ToJSON(eCfg), utils.ToJSON(cfg))
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user