mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
coverage tests at engine
This commit is contained in:
committed by
Dan Christian Bogos
parent
4305c505a8
commit
e7520002eb
@@ -184,6 +184,24 @@ func TestSharedPopBalanceByStrategyMineHigh(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestSortBalancesByStrategyRandom(t *testing.T) {
|
||||
|
||||
bc := Balances{
|
||||
&Balance{Uuid: "uuuu", Value: 2.0, account: &Account{ID: "test"}},
|
||||
&Balance{Value: 1.0},
|
||||
&Balance{Value: 3.0},
|
||||
}
|
||||
sg := &SharedGroup{AccountParameters: map[string]*SharingParameters{
|
||||
"test": {Strategy: "default"}},
|
||||
}
|
||||
|
||||
sbc := sg.SortBalancesByStrategy(bc[0], bc)
|
||||
if len(sbc) != 3 {
|
||||
t.Error("Error sorting balance chain: ", sbc)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*func TestSharedPopBalanceByStrategyRandomHigh(t *testing.T) {
|
||||
bc := Balances{
|
||||
&Balance{Uuid: "uuuu", Value: 2.0, account: &Account{Id: "test"}},
|
||||
|
||||
Reference in New Issue
Block a user