mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-22 15:48:44 +05:00
Revise && add new unit tests
This commit is contained in:
committed by
Dan Christian Bogos
parent
3c57a8ddca
commit
8921bf8b99
@@ -1041,18 +1041,18 @@ func TestLibFiltersGetStringSliceOptsReturnConfigOpt(t *testing.T) {
|
||||
{
|
||||
FilterIDs: []string{"*string:~*req.Account:1001"},
|
||||
Tenant: "cgrates.net",
|
||||
Value: []string{"value1"},
|
||||
Values: []string{"value1"},
|
||||
},
|
||||
// filter will not pass, will ignore this opt
|
||||
{
|
||||
FilterIDs: []string{"*string:~*req.Account:1002"},
|
||||
Tenant: "cgrates.org",
|
||||
Value: []string{"value2"},
|
||||
Values: []string{"value2"},
|
||||
},
|
||||
{
|
||||
FilterIDs: []string{"*string:~*req.Account:1001"},
|
||||
Tenant: "cgrates.org",
|
||||
Value: []string{"value3"},
|
||||
Values: []string{"value3"},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1083,7 +1083,7 @@ func TestLibFiltersGetStringSliceOptsFilterCheckErr(t *testing.T) {
|
||||
{
|
||||
FilterIDs: []string{"*string.invalid:filter"},
|
||||
Tenant: "cgrates.org",
|
||||
Value: []string{"value2"},
|
||||
Values: []string{"value2"},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1113,7 +1113,7 @@ func TestLibFiltersGetStringSliceOptsReturnDefaultOpt(t *testing.T) {
|
||||
{
|
||||
FilterIDs: []string{"*string:~*req.Account:1002"},
|
||||
Tenant: "cgrates.org",
|
||||
Value: []string{"value2"},
|
||||
Values: []string{"value2"},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1146,7 +1146,7 @@ func TestLibFiltersGetStringSliceOptsReturnOptFromAPIOpts(t *testing.T) {
|
||||
{
|
||||
FilterIDs: []string{"*string:~*req.Account:1001"},
|
||||
Tenant: "cgrates.org",
|
||||
Value: []string{"value3"},
|
||||
Values: []string{"value3"},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -3524,7 +3524,7 @@ func TestStatSV1GetStatQueuesForEventsqIDsErr(t *testing.T) {
|
||||
{
|
||||
FilterIDs: []string{"*string.invalid:filter"},
|
||||
Tenant: "cgrates.org",
|
||||
Value: []string{"value2"},
|
||||
Values: []string{"value2"},
|
||||
},
|
||||
}
|
||||
data := NewInternalDB(nil, nil, cfg.DataDbCfg().Items)
|
||||
@@ -3792,7 +3792,7 @@ func TestStatQueueProcessEventProfileIDsErr(t *testing.T) {
|
||||
{
|
||||
FilterIDs: []string{"*string.invalid:filter"},
|
||||
Tenant: "cgrates.org",
|
||||
Value: []string{"value2"},
|
||||
Values: []string{"value2"},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -3877,7 +3877,7 @@ func TestStatQueueProcessEventPrometheusStatIDsErr(t *testing.T) {
|
||||
{
|
||||
FilterIDs: []string{"*string.invalid:filter"},
|
||||
Tenant: "cgrates.org",
|
||||
Value: []string{"value2"},
|
||||
Values: []string{"value2"},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -3349,7 +3349,7 @@ func TestThresholdSmatchingThresholdsForEventGetOptsErr(t *testing.T) {
|
||||
{
|
||||
FilterIDs: []string{"*string"},
|
||||
Tenant: "cgrates.org",
|
||||
Value: []string{"ProfIdVal"},
|
||||
Values: []string{"ProfIdVal"},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -3391,7 +3391,7 @@ func TestThresholdSmatchingThresholdsForEventWeightErr(t *testing.T) {
|
||||
cfg.ThresholdSCfg().Opts.ProfileIDs = []*utils.DynamicStringSliceOpt{
|
||||
{
|
||||
Tenant: "cgrates.org",
|
||||
Value: []string{"ACC1"},
|
||||
Values: []string{"ACC1"},
|
||||
},
|
||||
}
|
||||
cfg.ThresholdSCfg().Opts.ProfileIgnoreFilters = []*utils.DynamicBoolOpt{
|
||||
|
||||
Reference in New Issue
Block a user