Update integration test after new filter indexing

This commit is contained in:
TeoV
2018-01-24 13:59:17 +02:00
committed by Dan Christian Bogos
parent 9f63d925fa
commit d7ce45b63e
5 changed files with 14 additions and 14 deletions

View File

@@ -52,10 +52,10 @@ var sTestsAlsPrf = []func(t *testing.T){
testAttributeSLoadFromFolder,
testAttributeSGetAttributeForEvent,
testAttributeSProcessEvent,
testAttributeSGetAlsPrfBeforeSet,
testAttributeSSetAlsPrf,
testAttributeSUpdateAlsPrf,
testAttributeSRemAlsPrf,
// testAttributeSGetAlsPrfBeforeSet,
// testAttributeSSetAlsPrf,
// testAttributeSUpdateAlsPrf,
// testAttributeSRemAlsPrf,
testAttributeSKillEngine,
}

View File

@@ -1283,10 +1283,12 @@ func testV1FIdxCaGetResourceProfileWithNotFound(t *testing.T) {
},
Units: 6,
}
if err := tFIdxCaRpc.Call(utils.ResourceSv1AllocateResources, argsRU, &reply); err == nil || err.Error() != utils.ErrResourceUnavailable.Error() {
if err := tFIdxCaRpc.Call(utils.ResourceSv1AllocateResources,
argsRU, &reply); err == nil || err.Error() != utils.ErrNotFound.Error() {
t.Error(err)
}
if err := tFIdxCaRpc.Call(utils.ResourceSv1AuthorizeResources, argsRU, &reply); err.Error() != utils.ErrResourceUnauthorized.Error() {
if err := tFIdxCaRpc.Call(utils.ResourceSv1AuthorizeResources,
argsRU, &reply); err.Error() != utils.ErrNotFound.Error() {
t.Error(err)
}
if indexes, err = onStor.GetFilterReverseIndexes(engine.GetDBIndexKey(utils.StatQueueProfilePrefix, "cgrates.org", true),
@@ -1356,13 +1358,15 @@ func testV1FIdxCaSetResourceProfile(t *testing.T) {
},
Units: 6,
}
if err := tFIdxCaRpc.Call(utils.ResourceSv1AllocateResources, argsRU, &result); err != nil {
if err := tFIdxCaRpc.Call(utils.ResourceSv1AllocateResources,
argsRU, &result); err != nil {
t.Error(err)
} else if result != "Approved" {
t.Error("Unexpected reply returned", result)
}
if err := tFIdxCaRpc.Call(utils.ResourceSv1AuthorizeResources, argsRU, &result); err != nil {
if err := tFIdxCaRpc.Call(utils.ResourceSv1AuthorizeResources,
argsRU, &result); err != nil {
t.Error(err)
} else if result != "Approved" {
t.Error("Unexpected reply returned", result)
@@ -1419,7 +1423,7 @@ func testV1FIdxCaGetResourceProfileFromTP(t *testing.T) {
t.Error("Unexpected reply returned", reply)
}
idx := map[string]utils.StringMap{"ResGroup1": {"*default:*any:*any": true, "*string:Account:1001": true, "*string:Account:1002": true}}
idx := map[string]utils.StringMap{"ResGroup1": {"*default:*any:*any": true, "*prefix:Destination:10": true, "*prefix:Destination:20": true, "*string:Account:1001": true, "*string:Account:1002": true}}
fldNameVal := map[string]string{"ResGroup1": ""}
if indexes, err = onStor.GetFilterReverseIndexes(engine.GetDBIndexKey(utils.ResourceProfilesPrefix, "cgrates.org", true),
fldNameVal); err != nil {

View File

@@ -164,8 +164,6 @@
"attributes": { // Attribute service
"enabled": true, // starts Alias service: <true|false>.
"string_indexed_fields": [], // query indexes based on these fields for faster processing
"stringprefix_indexed_fields": [], // query indexes based on these fields for faster processing
},

View File

@@ -128,8 +128,6 @@
"attributes": { // Attribute service
"enabled": true, // starts Alias service: <true|false>.
"string_indexed_fields": [], // query indexes based on these fields for faster processing
"stringprefix_indexed_fields": [], // query indexes based on these fields for faster processing
},

View File

@@ -11,7 +11,7 @@ cgrates.org,FLTR_ACNT_BALANCE_1,*string,EventType,BalanceUpdate,
cgrates.org,FLTR_ACNT_BALANCE_1,*gte,Units,10.0,
cgrates.org,FLTR_ACNT_EXPIRED,*string,Account,1001;1002,2014-07-29T15:00:00Z
cgrates.org,FLTR_ACNT_EXPIRED,*gte,ExpiryTime,*now,
cgrates.org,FLTR_STATS_1,*string,Account,1001,
cgrates.org,FLTR_STATS_1,*string,Account,1002,
cgrates.org,FLTR_STATS_1,*string,EventType,StatUpdate,2014-07-29T15:00:00Z
cgrates.org,FLTR_STATS_1,*lt,ASR,40.0,
cgrates.org,FLTR_STATS_1,*lt,ACD,3m,
1 #Tenant[0] ID[1] FilterType[2] FilterFieldName[3] FilterFieldValues[4] ActivationInterval[5]
11 cgrates.org FLTR_ACNT_BALANCE_1 *gte Units 10.0
12 cgrates.org FLTR_ACNT_EXPIRED *string Account 1001;1002 2014-07-29T15:00:00Z
13 cgrates.org FLTR_ACNT_EXPIRED *gte ExpiryTime *now
14 cgrates.org FLTR_STATS_1 *string Account 1001 1002
15 cgrates.org FLTR_STATS_1 *string EventType StatUpdate 2014-07-29T15:00:00Z
16 cgrates.org FLTR_STATS_1 *lt ASR 40.0
17 cgrates.org FLTR_STATS_1 *lt ACD 3m