mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Update integration tests
This commit is contained in:
committed by
Dan Christian Bogos
parent
38447e9229
commit
49835ed93e
@@ -330,7 +330,7 @@
|
||||
"elsPipeline": "",
|
||||
"require_alias": "",
|
||||
"elsRouting": "",
|
||||
"elsTimeout": 0,
|
||||
"elsTimeout": "0",
|
||||
//"elsVersion": 0,
|
||||
"elsVersionType": "",
|
||||
"elsWaitForActiveShards": "",
|
||||
@@ -383,8 +383,8 @@
|
||||
"sqlDBName": "cgrates2", // if dbName is not present "cgrates" will be used as default
|
||||
"sqlTableName": "expTable", // tableName is mandatory in opts for sql exporter
|
||||
"postgresSSLMode": "disable",
|
||||
"sqlMaxIdleConns": "10",
|
||||
"sqlMaxOpenConns": "100",
|
||||
"sqlMaxIdleConns": 10,
|
||||
"sqlMaxOpenConns": 100,
|
||||
"sqlConnMaxLifetime": "0",
|
||||
},
|
||||
"fields":[ // in case that the path is *exp.*row user must complete all the fields one to one with his sql schema in the correct order
|
||||
@@ -403,8 +403,8 @@
|
||||
"sqlDBName": "cgrates2",
|
||||
"sqlTableName": "expTable",
|
||||
"postgresSSLMode": "disable",
|
||||
"sqlMaxIdleConns": "10",
|
||||
"sqlMaxOpenConns": "100",
|
||||
"sqlMaxIdleConns": 10,
|
||||
"sqlMaxOpenConns": 100,
|
||||
"sqlConnMaxLifetime": "0",
|
||||
},
|
||||
"fields":[ // the path constains *exp.columnName
|
||||
|
||||
@@ -97,6 +97,7 @@ func postEvent(_ *engine.Account, a *engine.Action, _ engine.Actions, _ *engine.
|
||||
ExportPath: a.ExtraParameters,
|
||||
Attempts: config.CgrConfig().GeneralCfg().PosterAttempts,
|
||||
FailedPostsDir: config.CgrConfig().GeneralCfg().FailedPostsDir,
|
||||
Opts: &config.EventExporterOpts{},
|
||||
}, config.CgrConfig(), nil, nil)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
@@ -73,6 +73,7 @@ func TestHttpJsonPoster(t *testing.T) {
|
||||
ExportPath: "http://localhost:8080/invalid",
|
||||
Attempts: 3,
|
||||
FailedPostsDir: "/tmp",
|
||||
Opts: &config.EventExporterOpts{},
|
||||
}, config.CgrConfig(), nil, nil)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
@@ -110,6 +111,7 @@ func TestHttpBytesPoster(t *testing.T) {
|
||||
ExportPath: "http://localhost:8080/invalid",
|
||||
Attempts: 3,
|
||||
FailedPostsDir: "/tmp",
|
||||
Opts: &config.EventExporterOpts{},
|
||||
}, config.CgrConfig(), nil, nil)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
|
||||
@@ -1415,7 +1415,6 @@ func TestErsOnEvictedDumpToJSONInvalidPath(t *testing.T) {
|
||||
if !strings.Contains(rcvLog, expLog) {
|
||||
t.Errorf("expected <%+v> to be included in: <%+v>", expLog, rcvLog)
|
||||
}
|
||||
// fmt.Println(rcvLog)
|
||||
utils.Logger.SetLogLevel(0)
|
||||
if err := os.RemoveAll(dirPath); err != nil {
|
||||
t.Error(err)
|
||||
|
||||
@@ -660,7 +660,7 @@ func TestSQLSetURLError2(t *testing.T) {
|
||||
rdrErr: nil,
|
||||
cap: nil,
|
||||
}
|
||||
err := testSQLEventReader.setURL("*mysql://cgrates:CGRateS.org@127.0.0.1:3306", "http://user^:passwo^rd@foo.com/", nil)
|
||||
err := testSQLEventReader.setURL("*mysql://cgrates:CGRateS.org@127.0.0.1:3306", "http://user^:passwo^rd@foo.com/", &config.EventReaderOpts{})
|
||||
expected := `parse "http://user^:passwo^rd@foo.com/": net/url: invalid userinfo`
|
||||
if err == nil || err.Error() != expected {
|
||||
t.Errorf("\nExpected <%+v>, \nReceived <%+v>", expected, err)
|
||||
|
||||
Reference in New Issue
Block a user