Renamed *string_prefix -> *stringprefix

This commit is contained in:
edwardro22
2018-01-22 12:20:09 +02:00
committed by Dan Christian Bogos
parent bd80a00109
commit 64f32a216e
7 changed files with 9 additions and 9 deletions

View File

@@ -168,7 +168,7 @@ func testFilterUpdateFilter(t *testing.T) {
Values: []string{"1001", "1002"},
},
&engine.RequestFilter{
FieldName: "*string_prefix",
FieldName: "*stringprefix",
Type: "Destination",
Values: []string{"10", "20"},
},

View File

@@ -179,7 +179,7 @@ func testTPFilterUpdateTPFilter(t *testing.T) {
Values: []string{"1001", "1002"},
},
&utils.TPFilter{
Type: "*string_prefix",
Type: "*stringprefix",
FieldName: "Destination",
Values: []string{"10", "20"},
},

View File

@@ -1,6 +1,6 @@
#Tenant[0],ID[1],FilterType[2],FilterFieldName[3],FilterFieldValues[4],ActivationInterval[5]
cgrates.org,FLTR_1,*string,Account,1001;1002,2014-07-29T15:00:00Z
cgrates.org,FLTR_1,*string_prefix,Destination,10;20,
cgrates.org,FLTR_1,*stringprefix,Destination,10;20,
cgrates.org,FLTR_1,*rsr,,Subject(~^1.*1$);Destination(1002),
cgrates.org,FLTR_ACNT_1007,*string,Account,1007,2014-07-29T15:00:00Z
cgrates.org,FLTR_ACNT_dan,*string,Account,dan,2014-07-29T15:00:00Z
1 #Tenant[0] ID[1] FilterType[2] FilterFieldName[3] FilterFieldValues[4] ActivationInterval[5]
2 cgrates.org FLTR_1 *string Account 1001;1002 2014-07-29T15:00:00Z
3 cgrates.org FLTR_1 *string_prefix *stringprefix Destination 10;20
4 cgrates.org FLTR_1 *rsr Subject(~^1.*1$);Destination(1002)
5 cgrates.org FLTR_ACNT_1007 *string Account 1007 2014-07-29T15:00:00Z
6 cgrates.org FLTR_ACNT_dan *string Account dan 2014-07-29T15:00:00Z

View File

@@ -1,6 +1,6 @@
#Tenant[0],ID[1],FilterType[2],FilterFieldName[3],FilterFieldValues[4],ActivationInterval[5]
cgrates.org,FLTR_1,*string,Account,1001;1002,2014-07-29T15:00:00Z
cgrates.org,FLTR_1,*string_prefix,Destination,10;20,
cgrates.org,FLTR_1,*stringprefix,Destination,10;20,
cgrates.org,FLTR_1,*rsr,,Subject(~^1.*1$);Destination(1002),
cgrates.org,FLTR_ACNT_1007,*string,Account,1007,2014-07-29T15:00:00Z
cgrates.org,FLTR_ACNT_dan,*string,Account,dan,2014-07-29T15:00:00Z
1 #Tenant[0] ID[1] FilterType[2] FilterFieldName[3] FilterFieldValues[4] ActivationInterval[5]
2 cgrates.org FLTR_1 *string Account 1001;1002 2014-07-29T15:00:00Z
3 cgrates.org FLTR_1 *string_prefix *stringprefix Destination 10;20
4 cgrates.org FLTR_1 *rsr Subject(~^1.*1$);Destination(1002)
5 cgrates.org FLTR_ACNT_1007 *string Account 1007 2014-07-29T15:00:00Z
6 cgrates.org FLTR_ACNT_dan *string Account dan 2014-07-29T15:00:00Z

View File

@@ -31,7 +31,7 @@ import (
const (
MetaString = "*string"
MetaStringPrefix = "*string_prefix"
MetaStringPrefix = "*stringprefix"
MetaTimings = "*timings"
MetaRSR = "*rsr"
MetaStatS = "*stats"

View File

@@ -307,13 +307,13 @@ func TestInlineFilterPassFiltersForEvent(t *testing.T) {
"Account": "1007",
}
if pass, err := filterS.PassFiltersForEvent("cgrates.org",
failEvent, []string{"*string_prefix:Account:10"}); err != nil {
failEvent, []string{"*stringprefix:Account:10"}); err != nil {
t.Errorf(err.Error())
} else if pass {
t.Errorf("Expecting: %+v, received: %+v", false, pass)
}
if pass, err := filterS.PassFiltersForEvent("cgrates.org",
passEvent, []string{"*string_prefix:Account:10"}); err != nil {
passEvent, []string{"*stringprefix:Account:10"}); err != nil {
t.Errorf(err.Error())
} else if !pass {
t.Errorf("Expecting: %+v, received: %+v", true, pass)

View File

@@ -284,7 +284,7 @@ cgrates.org,Threshold1,FLTR_1;FLTR_ACNT_dan,2014-07-29T15:00:00Z,true,10,1s,true
filters = `
#Tenant[0],ID[1],FilterType[2],FilterFieldName[3],FilterFieldValues[4],ActivationInterval[5]
cgrates.org,FLTR_1,*string,Account,1001;1002,2014-07-29T15:00:00Z
cgrates.org,FLTR_1,*string_prefix,Destination,10;20,2014-07-29T15:00:00Z
cgrates.org,FLTR_1,*stringprefix,Destination,10;20,2014-07-29T15:00:00Z
cgrates.org,FLTR_1,*rsr,,Subject(~^1.*1$);Destination(1002),
cgrates.org,FLTR_ACNT_dan,*string,Account,dan,2014-07-29T15:00:00Z
cgrates.org,FLTR_DST_DE,*destinations,Destination,DST_DE,2014-07-29T15:00:00Z
@@ -1564,7 +1564,7 @@ func TestLoadFilters(t *testing.T) {
},
&utils.TPFilter{
FieldName: "Destination",
Type: "*string_prefix",
Type: "*stringprefix",
Values: []string{"10", "20"},
},
&utils.TPFilter{