mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 10:06:24 +05:00
Updated account threshold test
This commit is contained in:
committed by
Dan Christian Bogos
parent
7e7657b30d
commit
2a6f2c140a
@@ -822,5 +822,7 @@ func (bl *BalanceSummary) FieldAsInterface(fldPath []string) (val interface{}, e
|
||||
return bl.Value, nil
|
||||
case utils.Disabled:
|
||||
return bl.Disabled, nil
|
||||
case utils.Initial:
|
||||
return bl.Initial, nil
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ func testAccWThdSetThresholdProfile(t *testing.T) {
|
||||
ThdPrf := &engine.ThresholdProfileWithAPIOpts{
|
||||
ThresholdProfile: &engine.ThresholdProfile{
|
||||
Tenant: "cgrates.org",
|
||||
FilterIDs: []string{"*string:~*opts.*eventType:AccountUpdate", "*string:~*asm.ID:1002", "*lt:~*asm.BalanceSummaries.testBalanceID.Value:56m"},
|
||||
FilterIDs: []string{"*string:~*opts.*eventType:AccountUpdate", "*string:~*asm.ID:1002", "*lt:~*asm.BalanceSummaries.testBalanceID.Value:56m", "*gte:~*asm.BalanceSummaries.testBalanceID.Initial:58m"},
|
||||
ID: "THD_ACNT_1002",
|
||||
MaxHits: 1,
|
||||
},
|
||||
|
||||
@@ -175,9 +175,9 @@ func (gl *GuardianLocker) GuardIDs(refID string, timeout time.Duration, lkIDs ..
|
||||
}
|
||||
|
||||
// UnguardIDs attempts to unlock a set of locks based on their reference ID received on lock
|
||||
func (gl *GuardianLocker) UnguardIDs(refID string) (_ []string) {
|
||||
if refID == "" {
|
||||
return
|
||||
func (gl *GuardianLocker) UnguardIDs(refID string) []string {
|
||||
if refID != "" {
|
||||
return gl.unlockWithReference(refID)
|
||||
}
|
||||
return gl.unlockWithReference(refID)
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -588,6 +588,7 @@ const (
|
||||
ExpiryTime = "ExpiryTime"
|
||||
AllowNegative = "AllowNegative"
|
||||
Disabled = "Disabled"
|
||||
Initial = "Initial"
|
||||
Action = "Action"
|
||||
|
||||
SessionSCosts = "SessionSCosts"
|
||||
|
||||
Reference in New Issue
Block a user