Example #1
0
func TestRPCITStartSecondEngine(t *testing.T) {
	if !*testIntegration {
		return
	}
	if ral2, err = engine.StopStartEngine(rpcITCfgPath2, *waitRater); err != nil {
		t.Fatal(err)
	}
}
Example #2
0
// Start CGR Engine
func TestSMGStartEngine(t *testing.T) {
	if !*testIntegration {
		return
	}
	if _, err := engine.StopStartEngine(daCfgPath, *waitRater); err != nil {
		t.Fatal(err)
	}
}
Example #3
0
// Start CGR Engine
func TestTPitStartEngine(t *testing.T) {
	if !*testTP {
		return
	}
	if _, err := engine.StopStartEngine(tpCfgPath, delay); err != nil { // Mongo requires more time to start
		t.Fatal(err)
	}
}
Example #4
0
func TestCsvITStartEngine(t *testing.T) {
	if !*testIT {
		return
	}
	if _, err := engine.StopStartEngine(csvCfgPath, *waitRater); err != nil {
		t.Fatal(err)
	}
}
Example #5
0
// Start CGR Engine
func TestDmtAgentStartEngine(t *testing.T) {
	if !*testIntegration {
		return
	}
	if _, err := engine.StopStartEngine(daCfgPath, 4000); err != nil {
		t.Fatal(err)
	}
}
func TestCdrsStartMasterEngine(t *testing.T) {
	if !*testIntegration {
		return
	}
	if _, err := engine.StopStartEngine(cdrsMasterCfgPath, *waitRater); err != nil {
		t.Fatal(err)
	}
}
Example #7
0
// Start CGR Engine
func TestSMGRplcStartEngine(t *testing.T) {
	if _, err := engine.StopStartEngine(smgRplcSlaveCfgPath, *waitRater); err != nil { // Start slave before master
		t.Fatal(err)
	}
	if _, err := engine.StartEngine(smgRplcMasterCfgPath, *waitRater); err != nil {
		t.Fatal(err)
	}
}
func TestCDRStatsLclStartEngine(t *testing.T) {
	if !*testLocal {
		return
	}
	if _, err := engine.StopStartEngine(cdrstCfgPath, 1000); err != nil {
		t.Fatal(err)
	}
}
Example #9
0
func TestV2CDRsPSQLStartEngine(t *testing.T) {
	if !*testLocal {
		return
	}
	if _, err := engine.StopStartEngine(cdrsPsqlCfgPath, *waitRater); err != nil {
		t.Fatal(err)
	}
}
Example #10
0
// Start CGR Engine
func TestTutLocalStartEngine(t *testing.T) {
	if !*testLocal {
		return
	}
	if _, err := engine.StopStartEngine(tutLocalCfgPath, *waitRater); err != nil {
		t.Fatal(err)
	}
}
Example #11
0
// Start CGR Engine
func TestApierV2itStartEngine(t *testing.T) {
	if !*testIT {
		return
	}
	if _, err := engine.StopStartEngine(apierCfgPath, 200); err != nil { // Mongo requires more time to start
		t.Fatal(err)
	}
}
Example #12
0
func TestFlatstoreLclStartEngine(t *testing.T) {
	if !*testLocal {
		return
	}
	if _, err := engine.StopStartEngine(flatstoreCfgPath, *waitRater); err != nil {
		t.Fatal(err)
	}
}
Example #13
0
// Start CGR Engine
func TestSTIStartEngine(t *testing.T) {
	if !*testSureTax {
		return
	}
	if _, err := engine.StopStartEngine(*configDir, *waitRater); err != nil {
		t.Fatal(err)
	}
}
Example #14
0
// Start CGR Engine
func TestTpStartEngine(t *testing.T) {
	if !*testIntegration {
		return
	}
	fmt.Printf("Before starting: %v\n", time.Now())
	if _, err := engine.StopStartEngine(tpCfgPath, 1000); err != nil {
		t.Fatal(err)
	}
	fmt.Printf("After starting: %v\n", time.Now())
}
Example #15
0
// Test stats persistence
func TestCDRStatsitStatsPersistence(t *testing.T) {
	time.Sleep(time.Duration(2) * time.Second) // Allow stats to be updated in dataDb
	if _, err := engine.StopStartEngine(cdrstCfgPath, *waitRater); err != nil {
		t.Fatal(err)
	}
	var err error
	cdrstRpc, err = jsonrpc.Dial("tcp", cdrstCfg.RPCJSONListen) // We connect over JSON so we can also troubleshoot if needed
	if err != nil {
		t.Fatal("Could not connect to rater: ", err.Error())
	}
	var rcvMetrics map[string]float64
	expectedMetrics := map[string]float64{"ASR": 75, "ACD": 15}
	if err := cdrstRpc.Call("CDRStatsV1.GetMetrics", AttrGetMetrics{StatsQueueId: "CDRST4"}, &rcvMetrics); err != nil {
		t.Error("Calling CDRStatsV1.GetMetrics, got error: ", err.Error())
	} else if !reflect.DeepEqual(expectedMetrics, rcvMetrics) {
		t.Errorf("Expecting: %v, received: %v", expectedMetrics, rcvMetrics)
	}
}
Example #16
0
func testV2CDRsStartEngine(t *testing.T) {
	if _, err := engine.StopStartEngine(cdrsCfgPath, *waitRater); err != nil {
		t.Fatal(err)
	}
}
Example #17
0
// Start CGR Engine
func TestTpStartEngine(t *testing.T) {
	if _, err := engine.StopStartEngine(tpCfgPath, 1000); err != nil {
		t.Fatal(err)
	}
}
Example #18
0
// Start CGR Engine
func TestDmtAgentStartEngine(t *testing.T) {
	if _, err := engine.StopStartEngine(daCfgPath, 4000); err != nil {
		t.Fatal(err)
	}
}
Example #19
0
func TestFlatstoreitStartEngine(t *testing.T) {
	if _, err := engine.StopStartEngine(flatstoreCfgPath, *waitRater); err != nil {
		t.Fatal(err)
	}
}
Example #20
0
func TestXmlITStartEngine(t *testing.T) {
	if _, err := engine.StopStartEngine(xmlCfgPath, *waitRater); err != nil {
		t.Fatal(err)
	}
}
Example #21
0
func TestPartcsvITStartEngine(t *testing.T) {
	if _, err := engine.StopStartEngine(partpartcsvCfgPath, *waitRater); err != nil {
		t.Fatal(err)
	}
}
Example #22
0
// Start CGR Engine
func TestTutSMGStartEngine(t *testing.T) {
	if _, err := engine.StopStartEngine(tutSMGCfgPath, *waitRater); err != nil {
		t.Fatal(err)
	}
}
Example #23
0
func TestCDRStatsitStartEngine(t *testing.T) {
	if _, err := engine.StopStartEngine(cdrstCfgPath, 1000); err != nil {
		t.Fatal(err)
	}
}
Example #24
0
func TestRPCITLclStartSecondEngine(t *testing.T) {
	if ral2, err = engine.StopStartEngine(rpcITCfgPath2, *waitRater); err != nil {
		t.Fatal(err)
	}
}