mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-23 16:18:44 +05:00
Analyzer it test
This commit is contained in:
committed by
Dan Christian Bogos
parent
9568a45f68
commit
540dead69c
@@ -24,6 +24,7 @@ package analyzers
|
||||
import (
|
||||
"errors"
|
||||
"flag"
|
||||
"fmt"
|
||||
"net"
|
||||
"net/rpc"
|
||||
"net/rpc/jsonrpc"
|
||||
@@ -69,7 +70,7 @@ var (
|
||||
var (
|
||||
dataDir = flag.String("data_dir", "/usr/share/cgrates", "CGR data dir path here")
|
||||
waitRater = flag.Int("wait_rater", 100, "Number of miliseconds to wait for rater to start and cache")
|
||||
encoding = flag.String("rpc", utils.MetaJSON, "what encoding whould be uused for rpc comunication")
|
||||
encoding = flag.String("rpc", utils.MetaJSON, "what encoding whould be used for rpc comunication")
|
||||
)
|
||||
|
||||
func newRPCClient(cfg *config.ListenCfg) (c *rpc.Client, err error) {
|
||||
@@ -138,13 +139,7 @@ func testAnalyzerSRPCConn(t *testing.T) {
|
||||
|
||||
func testAnalyzerSLoadTarrifPlans(t *testing.T) {
|
||||
var reply string
|
||||
// attrs := &utils.AttrLoadTpFromFolder{FolderPath: path.Join(*dataDir, "tariffplans", "tutorial")}
|
||||
// if err := anzRPC.Call(utils.APIerSv1LoadTariffPlanFromFolder, attrs, &reply); err != nil {
|
||||
// t.Error(err)
|
||||
// } else if reply != utils.OK {
|
||||
// t.Error("Unexpected reply returned", reply)
|
||||
// }
|
||||
// time.Sleep(100 * time.Millisecond)
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
if err := anzRPC.Call(utils.LoaderSv1Run, &loaders.ArgsProcessFolder{
|
||||
APIOpts: map[string]interface{}{utils.MetaCache: utils.MetaReload},
|
||||
}, &reply); err != nil {
|
||||
@@ -244,7 +239,7 @@ func testAnalyzerSV1Search(t *testing.T) {
|
||||
} else if len(result) != 1 {
|
||||
t.Errorf("Unexpected result: %s", utils.ToJSON(result))
|
||||
}
|
||||
// fmt.Println(utils.ToJSON(result))
|
||||
fmt.Println(utils.ToJSON(result))
|
||||
}
|
||||
|
||||
func testAnalyzerSV1Search2(t *testing.T) {
|
||||
|
||||
@@ -21,22 +21,6 @@
|
||||
"db_port": 27017,
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
"rals": {
|
||||
"enabled": true,
|
||||
"thresholds_conns": ["*internal"],
|
||||
"max_increments":3000000,
|
||||
},
|
||||
|
||||
|
||||
"schedulers": {
|
||||
"enabled": true,
|
||||
"cdrs_conns": ["*localhost"],
|
||||
},
|
||||
|
||||
|
||||
"cdrs": {
|
||||
"enabled": true,
|
||||
},
|
||||
@@ -72,7 +56,7 @@
|
||||
"enabled": true,
|
||||
"stats_conns": ["*localhost"],
|
||||
"resources_conns": ["*localhost"],
|
||||
"rals_conns": ["*internal"],
|
||||
"rates_conns": ["*internal"],
|
||||
},
|
||||
|
||||
|
||||
@@ -86,7 +70,7 @@
|
||||
|
||||
"sessions": {
|
||||
"enabled": true,
|
||||
"rals_conns": ["*internal"],
|
||||
"rates_conns": ["*internal"],
|
||||
"cdrs_conns": ["*internal"],
|
||||
"chargers_conns": ["*internal"],
|
||||
},
|
||||
@@ -103,7 +87,6 @@
|
||||
|
||||
"admins": {
|
||||
"enabled": true,
|
||||
"scheduler_conns": ["*internal"],
|
||||
},
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user