func TestCdrsStartSlaveEngine(t *testing.T) {
	if !*testIntegration {
		return
	}
	if _, err := engine.StartEngine(cdrsSlaveCfgPath, *waitRater); err != nil {
		t.Fatal(err)
	}
}
// Start first engine
func TestRPCITStartFirstEngine(t *testing.T) {
	if !*testIntegration {
		return
	}
	if ral1, err = engine.StartEngine(rpcITCfgPath1, *waitRater); err != nil {
		t.Fatal(err)
	}
}
Exemple #3
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 TestV2CdrsPsqlStartEngine(t *testing.T) {
	if !*testLocal {
		return
	}
	var err error
	if cmdEngineCdrPsql, err = engine.StartEngine(cdrsPsqlCfgPath, *waitRater); err != nil {
		t.Fatal(err)
	}
}
Exemple #5
0
func TestRPCITLclStatusBcastRALs1Up(t *testing.T) {
	if ral1, err = engine.StartEngine(rpcITCfgPath1, *waitRater); err != nil {
		t.Fatal(err)
	}
	var status map[string]interface{}
	if err := rpcPoolBroadcast.Call("Responder.Status", "", &status); err != nil {
		t.Error(err)
	} else if status[utils.InstanceID].(string) == "" {
		t.Error("Empty InstanceID received")
	}
	if err := rpcPoolBroadcast.Call("Responder.Status", "", &status); err != nil {
		t.Error(err)
	} else if status[utils.InstanceID].(string) == "" {
		t.Error("Empty InstanceID received")
	}
}
Exemple #6
0
func TestRPCITLclStatusFirstFailback(t *testing.T) {
	if ral1, err = engine.StartEngine(rpcITCfgPath1, *waitRater); err != nil {
		t.Fatal(err)
	}
	var status map[string]interface{}
	if err := rpcPoolFirst.Call("Responder.Status", "", &status); err != nil {
		t.Error(err)
	} else if status[utils.InstanceID].(string) == ral2ID {
		t.Error("Should receive new ID")
	} else {
		ral1ID = status[utils.InstanceID].(string)
	}
	if err := rpcPoolFirst.Call("Responder.Status", "", &status); err != nil { // Make sure second time we land on the same instance
		t.Error(err)
	} else if status[utils.InstanceID].(string) != ral1ID {
		t.Errorf("Expecting: %s, received: %s", ral1ID, status[utils.InstanceID].(string))
	}
}
Exemple #7
0
// Start first engine
func TestRPCITLclStartFirstEngine(t *testing.T) {
	if ral1, err = engine.StartEngine(rpcITCfgPath1, *waitRater); err != nil {
		t.Fatal(err)
	}
}