mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
test for identical uuid in different account
This commit is contained in:
@@ -192,6 +192,7 @@ CDRST2_WARN_ACD,,*min_acd,3,true,0,,,,,,,,,,,5,CDRST_WARN_HTTP,10
|
||||
accountActions = `
|
||||
vdf,minitsboy,*out,MORE_MINUTES,STANDARD_TRIGGER
|
||||
cgrates.org,12345,*out,TOPUP10_AT,STANDARD_TRIGGERS
|
||||
cgrates.org,123456,*out,TOPUP10_AT,STANDARD_TRIGGERS
|
||||
cgrates.org,remo,*out,TOPUP10_AT,
|
||||
vdf,empty0,*out,TOPUP_SHARED0_AT,
|
||||
vdf,empty10,*out,TOPUP_SHARED10_AT,
|
||||
@@ -1022,7 +1023,7 @@ func TestLoadActionTriggers(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestLoadAccountActions(t *testing.T) {
|
||||
if len(csvr.accountActions) != 8 {
|
||||
if len(csvr.accountActions) != 9 {
|
||||
t.Error("Failed to load account actions: ", len(csvr.accountActions))
|
||||
}
|
||||
aa := csvr.accountActions["*out:vdf:minitsboy"]
|
||||
|
||||
@@ -244,6 +244,21 @@ func TestStoreInterfaces(t *testing.T) {
|
||||
var _ LogStorage = sql
|
||||
}
|
||||
|
||||
func TestDifferentUuid(t *testing.T) {
|
||||
a1, err := accountingStorage.GetAccount("*out:cgrates.org:12345")
|
||||
if err != nil {
|
||||
t.Error("Error getting account: ", err)
|
||||
}
|
||||
a2, err := accountingStorage.GetAccount("*out:cgrates.org:123456")
|
||||
if err != nil {
|
||||
t.Error("Error getting account: ", err)
|
||||
}
|
||||
if a1.BalanceMap[utils.VOICE+utils.OUT][0].Uuid == a2.BalanceMap[utils.VOICE+utils.OUT][0].Uuid ||
|
||||
a1.BalanceMap[utils.MONETARY+utils.OUT][0].Uuid == a2.BalanceMap[utils.MONETARY+utils.OUT][0].Uuid {
|
||||
t.Errorf("Identical uuids in different accounts: %+v <-> %+v", a1.BalanceMap[utils.VOICE+utils.OUT][0], a1.BalanceMap[utils.MONETARY+utils.OUT][0])
|
||||
}
|
||||
}
|
||||
|
||||
/************************** Benchmarks *****************************/
|
||||
|
||||
func GetUB() *Account {
|
||||
|
||||
Reference in New Issue
Block a user