mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-21 23:28:44 +05:00
Switch from redis keys to scan for GetKeys driver + tests and fixes
This commit is contained in:
committed by
Dan Christian Bogos
parent
d847ec5d98
commit
6bcb9b0008
@@ -1051,7 +1051,6 @@ func TestEventChargerMerge(t *testing.T) {
|
||||
if !reflect.DeepEqual(expEc, eEvChgs) {
|
||||
t.Errorf("Expected %v \n but received \n %v", ToJSON(expEc), ToJSON(eEvChgs))
|
||||
}
|
||||
// fmt.Println(ToJSON(eEvChgs))
|
||||
}
|
||||
|
||||
func TestEventChargesAppendChargeEntry(t *testing.T) {
|
||||
|
||||
@@ -19,7 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
package utils
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"reflect"
|
||||
"testing"
|
||||
"time"
|
||||
@@ -1534,8 +1533,7 @@ func TestRateSIncrementCostNoID(t *testing.T) {
|
||||
|
||||
cost := rIc.Cost(rts)
|
||||
if cost != nil {
|
||||
fmt.Println(cost)
|
||||
t.Error("Expected to be nil")
|
||||
t.Errorf("expected cost to be nil, received <%+v>", cost)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1765,7 +1763,7 @@ func TestRateSIntervalCost(t *testing.T) {
|
||||
rcv := rIv.Cost(rts)
|
||||
exp := decimal.WithContext(DecimalContext).SetUint64(2)
|
||||
if !reflect.DeepEqual(rcv, exp) {
|
||||
fmt.Printf("Expected %v \n but received \n %v", exp, rcv)
|
||||
t.Errorf("expected <%v>,\nreceived <%v>", exp, rcv)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -299,7 +299,6 @@ func TestStringSetFieldAsInterface(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
// fmt.Println(rcv)
|
||||
_, err = s.FieldAsInterface([]string{"field2"})
|
||||
if err != ErrNotFound {
|
||||
t.Errorf("Expected %v", ErrNotFound)
|
||||
|
||||
@@ -18,7 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
package utils
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math/cmplx"
|
||||
"reflect"
|
||||
"testing"
|
||||
@@ -236,6 +235,6 @@ func TestContentStructFieldByIndexIsEmpty(t *testing.T) {
|
||||
},
|
||||
}
|
||||
if fieldByIndexIsEmpty(reflect.ValueOf(myStruct), []int{1, 0}) {
|
||||
fmt.Printf("%v", myStruct)
|
||||
t.Errorf("%v", myStruct)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user