Check CDRs in CDR .csv test

This commit is contained in:
DanB
2016-05-01 19:30:14 +02:00
parent cd5993467d
commit e537659f0e
2 changed files with 18 additions and 3 deletions

View File

@@ -30,6 +30,7 @@ import (
"github.com/cgrates/cgrates/config"
"github.com/cgrates/cgrates/engine"
"github.com/cgrates/cgrates/utils"
)
/*
@@ -86,7 +87,6 @@ func TestCsvITInitCdrDb(t *testing.T) {
}
}
/*
func TestCsvITCreateCdrDirs(t *testing.T) {
if !*testIT {
return
@@ -105,7 +105,6 @@ func TestCsvITCreateCdrDirs(t *testing.T) {
}
}
func TestCsvITStartEngine(t *testing.T) {
if !*testIT {
return
@@ -114,7 +113,6 @@ func TestCsvITStartEngine(t *testing.T) {
t.Fatal(err)
}
}
*/
// Connect rpc client to rater
func TestCsvITRpcConn(t *testing.T) {
@@ -175,6 +173,19 @@ func TestCsvITProcessedFiles(t *testing.T) {
}
}
func TestCsvITAnalyseCDRs(t *testing.T) {
if !*testIT {
return
}
var reply []*engine.ExternalCDR
req := utils.RPCCDRsFilter{}
if err := cdrcRpc.Call("ApierV2.GetCdrs", req, &reply); err != nil {
t.Error("Unexpected error: ", err.Error())
} else if len(reply) != 6 { // 1 injected, 1 rated, 1 *raw and it's pair in *default run
t.Error("Unexpected number of CDRs returned: ", len(reply))
}
}
func TestCsvITKillEngine(t *testing.T) {
if !*testIT {
return

View File

@@ -7,6 +7,10 @@
// This is what you get when you load CGRateS with an empty configuration file.
"rals": {
"enabled": true // so we can query CDRs
},
"cdrs": {
"enabled": true,
"rals_conns": [], // no rating support, just *raw CDR testing