mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-19 22:28:45 +05:00
SMG - session indexing implementation with tests
This commit is contained in:
@@ -42,7 +42,7 @@ func TestBalanceStoreRestore(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Error("Error restoring balance: ", err)
|
||||
}
|
||||
t.Logf("INITIAL: %+v", b)
|
||||
//t.Logf("INITIAL: %+v", b)
|
||||
if !b.Equal(b1) {
|
||||
t.Errorf("Balance store/restore failed: expected %+v was %+v", b, b1)
|
||||
}
|
||||
@@ -321,7 +321,7 @@ func TestDebitCreditZeroMinute(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Error("Error debiting balance: ", err)
|
||||
}
|
||||
t.Logf("%+v", cc.Timespans)
|
||||
//t.Logf("%+v", cc.Timespans)
|
||||
if cc.Timespans[0].Increments[0].BalanceInfo.Unit.UUID != "testb" ||
|
||||
cc.Timespans[0].Increments[0].Duration != time.Minute {
|
||||
t.Error("Error setting balance id to increment: ", cc.Timespans[0].Increments[0])
|
||||
|
||||
@@ -827,6 +827,11 @@ func (cdr *CDR) AsExportRecord(exportFields []*config.CfgCdrField, costShiftDigi
|
||||
return expRecord, nil
|
||||
}
|
||||
|
||||
// Part of event interface
|
||||
func (cdr *CDR) AsMapStringIface() (map[string]interface{}, error) {
|
||||
return nil, utils.ErrNotImplemented
|
||||
}
|
||||
|
||||
type ExternalCDR struct {
|
||||
CGRID string
|
||||
RunID string
|
||||
|
||||
@@ -51,4 +51,5 @@ type Event interface {
|
||||
String() string
|
||||
AsEvent(string) Event
|
||||
ComputeLcr() bool
|
||||
AsMapStringIface() (map[string]interface{}, error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user