mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Empty default password for stordb to avoid mongo issues, tests fixups
This commit is contained in:
@@ -47,7 +47,7 @@ var dataDB engine.DataDB // share db connection here so we can check data we set
|
||||
|
||||
func TestApierV2itLoadConfig(t *testing.T) {
|
||||
apierCfgPath = path.Join(*dataDir, "conf", "samples", "tutmysql")
|
||||
if apierCfg, err = config.NewCGRConfigFromFolder(tpCfgPath); err != nil {
|
||||
if apierCfg, err = config.NewCGRConfigFromFolder(apierCfgPath); err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,7 +56,6 @@ var sTestsCDRsIT = []func(t *testing.T){
|
||||
}
|
||||
|
||||
// Tests starting here
|
||||
|
||||
func TestCDRsITMySQL(t *testing.T) {
|
||||
cdrsConfDIR = "cdrsv2mysql"
|
||||
for _, stest := range sTestsCDRsIT {
|
||||
|
||||
@@ -88,7 +88,7 @@ const CGRATES_CFG_JSON = `
|
||||
"db_host": "127.0.0.1", // data_db host address
|
||||
"db_port": 6379, // data_db port to reach the database
|
||||
"db_name": "10", // data_db database name to connect to
|
||||
"db_user": "", // username to use when connecting to data_db
|
||||
"db_user": "cgrates", // username to use when connecting to data_db
|
||||
"db_password": "", // password to use when connecting to data_db
|
||||
"load_history_size": 10, // Number of records in the load history
|
||||
},
|
||||
@@ -100,7 +100,7 @@ const CGRATES_CFG_JSON = `
|
||||
"db_port": 3306, // the port to reach the stordb
|
||||
"db_name": "cgrates", // stor database name
|
||||
"db_user": "cgrates", // username to use when connecting to stordb
|
||||
"db_password": "CGRateS.org", // password to use when connecting to stordb
|
||||
"db_password": "", // password to use when connecting to stordb
|
||||
"max_open_conns": 100, // maximum database connections opened
|
||||
"max_idle_conns": 10, // maximum database connections idle
|
||||
"cdrs_indexes": [], // indexes on cdrs table to speed up queries, used only in case of mongo
|
||||
|
||||
@@ -123,7 +123,7 @@ func TestDfDbJsonCfg(t *testing.T) {
|
||||
Db_host: utils.StringPointer("127.0.0.1"),
|
||||
Db_port: utils.IntPointer(6379),
|
||||
Db_name: utils.StringPointer("10"),
|
||||
Db_user: utils.StringPointer(""),
|
||||
Db_user: utils.StringPointer("cgrates"),
|
||||
Db_password: utils.StringPointer(""),
|
||||
Load_history_size: utils.IntPointer(10),
|
||||
}
|
||||
@@ -138,7 +138,7 @@ func TestDfDbJsonCfg(t *testing.T) {
|
||||
Db_port: utils.IntPointer(3306),
|
||||
Db_name: utils.StringPointer("cgrates"),
|
||||
Db_user: utils.StringPointer("cgrates"),
|
||||
Db_password: utils.StringPointer("CGRateS.org"),
|
||||
Db_password: utils.StringPointer(""),
|
||||
Max_open_conns: utils.IntPointer(100),
|
||||
Max_idle_conns: utils.IntPointer(10),
|
||||
Cdrs_indexes: utils.StringSlicePointer([]string{}),
|
||||
|
||||
@@ -220,7 +220,7 @@ func TestCgrCfgJSONDefaultsjsnDataDb(t *testing.T) {
|
||||
if cgrCfg.DataDbName != "10" {
|
||||
t.Error(cgrCfg.DataDbName)
|
||||
}
|
||||
if cgrCfg.DataDbUser != "" {
|
||||
if cgrCfg.DataDbUser != "cgrates" {
|
||||
t.Error(cgrCfg.DataDbUser)
|
||||
}
|
||||
if cgrCfg.DataDbPass != "" {
|
||||
@@ -247,7 +247,7 @@ func TestCgrCfgJSONDefaultsStorDB(t *testing.T) {
|
||||
if cgrCfg.StorDBUser != "cgrates" {
|
||||
t.Error(cgrCfg.StorDBUser)
|
||||
}
|
||||
if cgrCfg.StorDBPass != "CGRateS.org" {
|
||||
if cgrCfg.StorDBPass != "" {
|
||||
t.Error(cgrCfg.StorDBPass)
|
||||
}
|
||||
if cgrCfg.StorDBMaxOpenConns != 100 {
|
||||
|
||||
@@ -14,6 +14,12 @@
|
||||
"http": ":2080", // HTTP listening address
|
||||
},
|
||||
|
||||
|
||||
"stor_db": { // database used to store offline tariff plans and CDRs
|
||||
"db_password": "CGRateS.org", // password to use when connecting to stordb
|
||||
},
|
||||
|
||||
|
||||
"rals": {
|
||||
"enabled": true, // enable Rater service: <true|false>
|
||||
"pubsubs_conns": [
|
||||
|
||||
@@ -29,10 +29,16 @@
|
||||
|
||||
"listen": {
|
||||
"rpc_json": ":2012", // RPC JSON listening address
|
||||
"rpc_gob": ":2013", // RPC GOB listening address
|
||||
"rpc_gob": ":2013", // RPC GOB listening address
|
||||
"http": ":2080", // HTTP listening address
|
||||
},
|
||||
|
||||
|
||||
"stor_db": { // database used to store offline tariff plans and CDRs
|
||||
"db_password": "CGRateS.org", // password to use when connecting to stordb
|
||||
},
|
||||
|
||||
|
||||
"rals": {
|
||||
"enabled": true, // enable Rater service: <true|false>
|
||||
"aliases_conns": [
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
// This file contains the default configuration hardcoded into CGRateS.
|
||||
// This is what you get when you load CGRateS with an empty configuration file.
|
||||
|
||||
"stor_db": { // database used to store offline tariff plans and CDRs
|
||||
"db_password": "CGRateS.org", // password to use when connecting to stordb
|
||||
},
|
||||
|
||||
"rals": {
|
||||
"enabled": true // so we can query CDRs
|
||||
|
||||
@@ -7,6 +7,10 @@
|
||||
// This is what you get when you load CGRateS with an empty configuration file.
|
||||
|
||||
|
||||
"stor_db": { // database used to store offline tariff plans and CDRs
|
||||
"db_password": "CGRateS.org", // password to use when connecting to stordb
|
||||
},
|
||||
|
||||
"rals": {
|
||||
"enabled": true // so we can query CDRs
|
||||
},
|
||||
|
||||
@@ -11,6 +11,10 @@
|
||||
"enabled": true, // enable Rater service: <true|false>
|
||||
},
|
||||
|
||||
"stor_db": { // database used to store offline tariff plans and CDRs
|
||||
"db_password": "CGRateS.org", // password to use when connecting to stordb
|
||||
},
|
||||
|
||||
|
||||
"scheduler": {
|
||||
"enabled": true, // start Scheduler service: <true|false>
|
||||
|
||||
@@ -7,6 +7,10 @@
|
||||
// This is what you get when you load CGRateS with an empty configuration file.
|
||||
|
||||
|
||||
"stor_db": { // database used to store offline tariff plans and CDRs
|
||||
"db_password": "CGRateS.org", // password to use when connecting to stordb
|
||||
},
|
||||
|
||||
"rals": {
|
||||
"enabled": true, // enable Rater service: <true|false>
|
||||
},
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
// Real-time Charging System for Telecom & ISP environments
|
||||
// Copyright (C) ITsysCOM GmbH
|
||||
|
||||
"stor_db": { // database used to store offline tariff plans and CDRs
|
||||
"db_password": "CGRateS.org", // password to use when connecting to stordb
|
||||
},
|
||||
|
||||
"rals": {
|
||||
"enabled": true
|
||||
|
||||
@@ -9,6 +9,12 @@
|
||||
"poster_attempts": 1,
|
||||
},
|
||||
|
||||
|
||||
"stor_db": { // database used to store offline tariff plans and CDRs
|
||||
"db_password": "CGRateS.org", // password to use when connecting to stordb
|
||||
},
|
||||
|
||||
|
||||
"rals": {
|
||||
"enabled": true, // enable Rater service: <true|false>
|
||||
},
|
||||
|
||||
@@ -10,6 +10,10 @@
|
||||
"http": "127.0.0.1:12080", // HTTP listening address
|
||||
},
|
||||
|
||||
"stor_db": { // database used to store offline tariff plans and CDRs
|
||||
"db_password": "CGRateS.org", // password to use when connecting to stordb
|
||||
},
|
||||
|
||||
"rals": {
|
||||
"enabled": true, // enable Rater service: <true|false>
|
||||
},
|
||||
|
||||
@@ -10,6 +10,10 @@
|
||||
"http": ":2080",
|
||||
},
|
||||
|
||||
"stor_db": { // database used to store offline tariff plans and CDRs
|
||||
"db_password": "CGRateS.org", // password to use when connecting to stordb
|
||||
},
|
||||
|
||||
"rals": {
|
||||
"enabled": true,
|
||||
"cdrstats_conns": [
|
||||
|
||||
@@ -9,6 +9,11 @@
|
||||
},
|
||||
|
||||
|
||||
"stor_db": { // database used to store offline tariff plans and CDRs
|
||||
"db_password": "CGRateS.org", // password to use when connecting to stordb
|
||||
},
|
||||
|
||||
|
||||
"rals": {
|
||||
"enabled": true, // enable Rater service: <true|false>
|
||||
},
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
"stor_db": {
|
||||
"db_type": "postgres", // stor database type to use: <mysql|postgres>
|
||||
"db_port": 5432, // the port to reach the stordb
|
||||
"db_password": "CGRateS.org"
|
||||
},
|
||||
|
||||
|
||||
|
||||
@@ -4,6 +4,10 @@
|
||||
// Used in mediator_local_test
|
||||
// Starts rater, cdrs and mediator connecting over internal channel
|
||||
|
||||
"stor_db": { // database used to store offline tariff plans and CDRs
|
||||
"db_password": "CGRateS.org", // password to use when connecting to stordb
|
||||
},
|
||||
|
||||
"rals": {
|
||||
"enabled": true, // enable Rater service: <true|false>
|
||||
},
|
||||
|
||||
@@ -10,6 +10,10 @@
|
||||
"http": ":2080", // HTTP listening address
|
||||
},
|
||||
|
||||
"stor_db": { // database used to store offline tariff plans and CDRs
|
||||
"db_password": "CGRateS.org", // password to use when connecting to stordb
|
||||
},
|
||||
|
||||
"rals": {
|
||||
"enabled": true, // enable Rater service: <true|false>
|
||||
},
|
||||
|
||||
@@ -10,6 +10,10 @@
|
||||
"http": ":12080",
|
||||
},
|
||||
|
||||
"stor_db": { // database used to store offline tariff plans and CDRs
|
||||
"db_password": "CGRateS.org", // password to use when connecting to stordb
|
||||
},
|
||||
|
||||
"rals": {
|
||||
"enabled": true,
|
||||
},
|
||||
|
||||
@@ -14,6 +14,10 @@
|
||||
"http": ":2080", // HTTP listening address
|
||||
},
|
||||
|
||||
"stor_db": { // database used to store offline tariff plans and CDRs
|
||||
"db_password": "CGRateS.org", // password to use when connecting to stordb
|
||||
},
|
||||
|
||||
"rals": {
|
||||
"enabled": true, // enable Rater service: <true|false>
|
||||
},
|
||||
|
||||
@@ -7,6 +7,10 @@
|
||||
"log_level": 7,
|
||||
},
|
||||
|
||||
"stor_db": { // database used to store offline tariff plans and CDRs
|
||||
"db_password": "CGRateS.org", // password to use when connecting to stordb
|
||||
},
|
||||
|
||||
"rals": {
|
||||
"enabled": true, // enable Rater service: <true|false>
|
||||
},
|
||||
|
||||
@@ -12,6 +12,13 @@
|
||||
"http": "0.0.0.0:3080", // HTTP listening address
|
||||
},
|
||||
|
||||
|
||||
"stor_db": { // database used to store offline tariff plans and CDRs
|
||||
"db_password": "CGRateS.org", // password to use when connecting to stordb
|
||||
},
|
||||
|
||||
|
||||
|
||||
"cache":{
|
||||
"destinations": {"limit": 10000, "ttl":"0s", "precache": true},
|
||||
"reverse_destinations": {"limit": 10000, "ttl":"0s", "precache": true},
|
||||
|
||||
@@ -11,6 +11,10 @@
|
||||
"http": "127.0.0.1:2080",
|
||||
},
|
||||
|
||||
"stor_db": { // database used to store offline tariff plans and CDRs
|
||||
"db_password": "CGRateS.org", // password to use when connecting to stordb
|
||||
},
|
||||
|
||||
"rals": {
|
||||
"enabled": true,
|
||||
},
|
||||
|
||||
@@ -9,6 +9,10 @@
|
||||
"http": "127.0.0.1:22080", // HTTP listening address
|
||||
},
|
||||
|
||||
"stor_db": { // database used to store offline tariff plans and CDRs
|
||||
"db_password": "CGRateS.org", // password to use when connecting to stordb
|
||||
},
|
||||
|
||||
"rals": {
|
||||
"enabled": true, // enable Rater service: <true|false>
|
||||
},
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
"db_port": 3306, // the port to reach the stordb
|
||||
"db_name": "cgrates", // stor database name
|
||||
"db_user": "cgrates", // username to use when connecting to stordb
|
||||
"db_passwd": "CGRateS.org", // password to use when connecting to stordb
|
||||
"db_password": "CGRateS.org", // password to use when connecting to stordb
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
"db_port": 5432, // the port to reach the stordb
|
||||
"db_name": "cgrates", // stor database name
|
||||
"db_user": "cgrates", // username to use when connecting to stordb
|
||||
"db_passwd": "CGRateS.org", // password to use when connecting to stordb
|
||||
"db_password": "CGRateS.org", // password to use when connecting to stordb
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
@@ -14,6 +14,12 @@
|
||||
"http": ":2080",
|
||||
},
|
||||
|
||||
|
||||
"stor_db": { // database used to store offline tariff plans and CDRs
|
||||
"db_password": "CGRateS.org", // password to use when connecting to stordb
|
||||
},
|
||||
|
||||
|
||||
"cache":{
|
||||
"destinations": {"limit": 10000, "ttl":"0s", "precache": true},
|
||||
"reverse_destinations": {"limit": 10000, "ttl":"0s", "precache": true},
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
"stor_db": {
|
||||
"db_type": "postgres", // stor database type to use: <mysql|postgres>
|
||||
"db_port": 5432, // the port to reach the stordb
|
||||
"db_password": "CGRateS.org",
|
||||
},
|
||||
|
||||
"rals": {
|
||||
|
||||
@@ -39,6 +39,7 @@ var tpCsvScenario = flag.String("tp_scenario", "testtp", "Use this scenario fold
|
||||
// Will use 3 different datadbs in order to be able to see differences in data loaded
|
||||
func TestLoaderITConnDataDbs(t *testing.T) {
|
||||
lCfg, _ = config.NewDefaultCGRConfig()
|
||||
lCfg.StorDBPass = "CGRateS.org"
|
||||
var err error
|
||||
if dataDbCsv, err = ConfigureDataStorage(lCfg.DataDbType, lCfg.DataDbHost, lCfg.DataDbPort, "7",
|
||||
lCfg.DataDbUser, lCfg.DataDbPass, lCfg.DBDataEncoding, nil, 1); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user