diff --git a/apier/v1/filters_it_test.go b/apier/v1/filters_it_test.go index cd3caa002..ee32323e5 100644 --- a/apier/v1/filters_it_test.go +++ b/apier/v1/filters_it_test.go @@ -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"}, }, diff --git a/apier/v1/tpfilters_it_test.go b/apier/v1/tpfilters_it_test.go index 7782acaba..2ff36beb4 100644 --- a/apier/v1/tpfilters_it_test.go +++ b/apier/v1/tpfilters_it_test.go @@ -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"}, }, diff --git a/data/tariffplans/testtp/Filters.csv b/data/tariffplans/testtp/Filters.csv index 4a71dee40..38dc68ba3 100644 --- a/data/tariffplans/testtp/Filters.csv +++ b/data/tariffplans/testtp/Filters.csv @@ -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 diff --git a/data/tariffplans/tutorial/Filters.csv b/data/tariffplans/tutorial/Filters.csv index 5bdc0634f..f048deec2 100644 --- a/data/tariffplans/tutorial/Filters.csv +++ b/data/tariffplans/tutorial/Filters.csv @@ -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 diff --git a/engine/filters.go b/engine/filters.go index d8a468031..ba553d3f8 100644 --- a/engine/filters.go +++ b/engine/filters.go @@ -31,7 +31,7 @@ import ( const ( MetaString = "*string" - MetaStringPrefix = "*string_prefix" + MetaStringPrefix = "*stringprefix" MetaTimings = "*timings" MetaRSR = "*rsr" MetaStatS = "*stats" diff --git a/engine/filters_test.go b/engine/filters_test.go index 6811618b0..1ff1270ff 100644 --- a/engine/filters_test.go +++ b/engine/filters_test.go @@ -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) diff --git a/engine/loader_csv_test.go b/engine/loader_csv_test.go index e3ddee8d5..4f7738d8d 100755 --- a/engine/loader_csv_test.go +++ b/engine/loader_csv_test.go @@ -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{