Removed notlessthan, notlessorequal, notgreaterthan, notgreaterorequal filters

This commit is contained in:
Trial97
2019-02-25 11:21:42 +02:00
committed by Dan Christian Bogos
parent 33ef54f0fe
commit f8ed6445d9
2 changed files with 13 additions and 19 deletions

View File

@@ -47,22 +47,17 @@ const (
MetaGreaterOrEqual = "*gte"
MetaResources = "*resources"
MetaNotString = "*notstring"
MetaNotPrefix = "*notprefix"
MetaNotSuffix = "*notsuffix"
MetaNotEmpty = "*notempty"
MetaNotExists = "*notexists"
MetaNotTimings = "*nottimings"
MetaNotRSR = "*notrsr"
MetaNotStatS = "*notstats"
MetaNotDestinations = "*notdestinations"
MetaNotMinCapPrefix = "*notmin_"
MetaNotMaxCapPrefix = "*notmax_"
MetaNotLessThan = "*notlt"
MetaNotLessOrEqual = "*notlte"
MetaNotGreaterThan = "*notgt"
MetaNotGreaterOrEqual = "*notgte"
MetaNotResources = "*notresources"
MetaNotString = "*notstring"
MetaNotPrefix = "*notprefix"
MetaNotSuffix = "*notsuffix"
MetaNotEmpty = "*notempty"
MetaNotExists = "*notexists"
MetaNotTimings = "*nottimings"
MetaNotRSR = "*notrsr"
MetaNotStatS = "*notstats"
MetaNotDestinations = "*notdestinations"
MetaNotMinCapPrefix = "*notmin_"
MetaNotMaxCapPrefix = "*notmax_"
)
func NewFilterS(cfg *config.CGRConfig,
@@ -324,8 +319,7 @@ func (fltr *FilterRule) Pass(dP config.DataProvider,
result, err = fltr.passRSR(dP)
case MetaStatS, MetaNotStatS:
result, err = fltr.passStatS(dP, rpcClnt, tenant)
case MetaLessThan, MetaLessOrEqual, MetaGreaterThan, MetaGreaterOrEqual,
MetaNotLessThan, MetaNotLessOrEqual, MetaNotGreaterThan, MetaNotGreaterOrEqual:
case MetaLessThan, MetaLessOrEqual, MetaGreaterThan, MetaGreaterOrEqual:
result, err = fltr.passGreaterThan(dP)
case MetaResources, MetaNotResources:
result, err = fltr.passResourceS(dP, rpcClnt, tenant)

View File

@@ -159,7 +159,7 @@ func TestDZ1Debit(t *testing.T) {
}
acnt, err := dataDB.DataDB().GetAccount("cgrates.org:12344")
if err != nil {
t.Error(err)
t.Fatal(err)
}
if acnt.BalanceMap[utils.VOICE][0].Value != 20000000000 {
t.Error("Account does not have expected *voice units in balance",