mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-24 08:38:45 +05:00
One filter in tp_reader
This commit is contained in:
committed by
Dan Christian Bogos
parent
7a78d074c4
commit
3b880c8c8b
@@ -1509,7 +1509,7 @@ func TestLoadThresholdProfiles(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestLoadFilterProfiles(t *testing.T) {
|
||||
func TestLoadFilters(t *testing.T) {
|
||||
eFilters := map[string]map[string]*utils.TPFilter{
|
||||
"cgrates.org": map[string]*utils.TPFilter{
|
||||
"FLTR_1": &utils.TPFilter{
|
||||
@@ -1584,10 +1584,10 @@ func TestLoadFilterProfiles(t *testing.T) {
|
||||
},
|
||||
},
|
||||
}
|
||||
if len(csvr.flProfiles["cgrates.org"]) != len(eFilters["cgrates.org"]) {
|
||||
t.Errorf("Failed to load FilterProfiles: %s", utils.ToIJSON(csvr.flProfiles))
|
||||
} else if !reflect.DeepEqual(eFilters["cgrates.org"]["FLTR_1"], csvr.flProfiles["cgrates.org"]["FLTR_1"]) {
|
||||
t.Errorf("Expecting: %+v, received: %+v", eFilters["cgrates.org"]["FLTR_1"], csvr.flProfiles["cgrates.org"]["FLTR_1"])
|
||||
if len(csvr.filters["cgrates.org"]) != len(eFilters["cgrates.org"]) {
|
||||
t.Errorf("Failed to load FilterProfiles: %s", utils.ToIJSON(csvr.filters))
|
||||
} else if !reflect.DeepEqual(eFilters["cgrates.org"]["FLTR_1"], csvr.filters["cgrates.org"]["FLTR_1"]) {
|
||||
t.Errorf("Expecting: %+v, received: %+v", eFilters["cgrates.org"]["FLTR_1"], csvr.filters["cgrates.org"]["FLTR_1"])
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1637,27 +1637,3 @@ func TestLoadThresholds(t *testing.T) {
|
||||
t.Errorf("Expecting: %+v, received: %+v", eThresholds, csvr.thresholds)
|
||||
}
|
||||
}
|
||||
|
||||
func TestLoadFilters(t *testing.T) {
|
||||
eFilters := []*utils.TenantID{
|
||||
&utils.TenantID{
|
||||
Tenant: "cgrates.org",
|
||||
ID: "FLTR_1",
|
||||
},
|
||||
&utils.TenantID{
|
||||
Tenant: "cgrates.org",
|
||||
ID: "FLTR_ACNT_dan",
|
||||
},
|
||||
&utils.TenantID{
|
||||
Tenant: "cgrates.org",
|
||||
ID: "FLTR_DST_DE",
|
||||
},
|
||||
&utils.TenantID{
|
||||
Tenant: "cgrates.org",
|
||||
ID: "FLTR_DST_NL",
|
||||
},
|
||||
}
|
||||
if len(csvr.filters) != len(eFilters) {
|
||||
t.Errorf("Failed to load filters: %s", utils.ToIJSON(csvr.filters))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user