From a90628a0c81423aa3dd2904bfbddfb8eecfab348 Mon Sep 17 00:00:00 2001 From: porosnicuadrian Date: Thu, 14 Oct 2021 17:05:17 +0300 Subject: [PATCH] Added missing tenant in opts config --- .../cgrates.json | 11 +++++++- .../cgrates.json | 11 +++++++- .../cgrates.json | 27 ++++++++++++------- .../session_volume_discount_it_test.go | 5 ++-- 4 files changed, 41 insertions(+), 13 deletions(-) diff --git a/data/conf/samples/session_volume_discount_internal/cgrates.json b/data/conf/samples/session_volume_discount_internal/cgrates.json index 355787cf2..e5e4d03de 100644 --- a/data/conf/samples/session_volume_discount_internal/cgrates.json +++ b/data/conf/samples/session_volume_discount_internal/cgrates.json @@ -27,6 +27,7 @@ "opts":{ "*processRuns": [ { + "Tenant": "*any", "Value": 2, }, ], // @@ -42,28 +43,33 @@ "opts": { "*chargerS": [ { + "Tenant": "*any", "FilterIDs": ["*notstring:~*req.Account:sipp"], "Value": true, }, ], "*rateS": [ { + "Tenant": "*any", "FilterIDs": ["*notstring:~*req.Account:sipp|1001"], "Value": true, }, { + "Tenant": "*any", "FilterIDs": ["*string:~*req.RunID:customers"], "Value": true, }, ], "*accountS": [ { + "Tenant": "*any", "FilterIDs": ["*string:~*req.Account:1001", "*string:~*req.RunID:suppliers"], "Value": true, }, ], "*eeS": [ { + "Tenant": "*any", "Value": true, }, ], @@ -93,7 +99,8 @@ "opts":{ "*profileIgnoreFilters": [ { - "Value": "true", + "Tenant": "*any", + "Value": true, }, ], }, @@ -105,6 +112,7 @@ "opts":{ "*usage": [ { + "Tenant": "*any", "Value": "1m", }, ], @@ -129,6 +137,7 @@ "opts":{ "*ignoreErrors": [ { + "Tenant": "*any", "Value": true, }, ], diff --git a/data/conf/samples/session_volume_discount_mongo/cgrates.json b/data/conf/samples/session_volume_discount_mongo/cgrates.json index fcc9de758..46c70a01a 100644 --- a/data/conf/samples/session_volume_discount_mongo/cgrates.json +++ b/data/conf/samples/session_volume_discount_mongo/cgrates.json @@ -32,6 +32,7 @@ "opts":{ // "*processRuns": [ { + "Tenant": "*any", "Value": 2, }, ], @@ -47,28 +48,33 @@ "opts": { "*chargerS": [ { + "Tenant": "*any", "FilterIDs": ["*notstring:~*req.Account:sipp"], "Value": true, }, ], "*rateS": [ { + "Tenant": "*any", "FilterIDs": ["*notstring:~*req.Account:sipp|1001"], "Value": true, }, { + "Tenant": "*any", "FilterIDs": ["*string:~*req.RunID:customers"], "Value": true, }, ], "*accountS": [ { + "Tenant": "*any", "FilterIDs": ["*string:~*req.Account:1001", "*string:~*req.RunID:suppliers"], "Value": true, }, ], "*eeS": [ { + "Tenant": "*any", "Value": true, }, ], @@ -98,7 +104,8 @@ "opts":{ "*profileIgnoreFilters": [ { - "Value": "true", + "Tenant": "*any", + "Value": true, }, ], }, @@ -110,6 +117,7 @@ "opts":{ "*usage": [ { + "Tenant": "*any", "Value": "1m", }, ], @@ -133,6 +141,7 @@ "rates_conns": ["*localhost"], "*ignoreErrors": [ { + "Tenant": "*any", "Value": true, }, ], diff --git a/data/conf/samples/session_volume_discount_mysql/cgrates.json b/data/conf/samples/session_volume_discount_mysql/cgrates.json index e2a77398d..02ac9221f 100644 --- a/data/conf/samples/session_volume_discount_mysql/cgrates.json +++ b/data/conf/samples/session_volume_discount_mysql/cgrates.json @@ -8,16 +8,16 @@ "reply_timeout": "10s", }, - "data_db": { // database used to store runtime data (eg: accounts, cdr stats) - "db_type": "redis", // data_db type: - "db_port": 6379, // data_db port to reach the database - "db_name": "10", // data_db database name to connect to + "data_db": { // database used to store runtime data (eg: accounts, cdr stats) + "db_type": "redis", // data_db type: + "db_port": 6379, // data_db port to reach the database + "db_name": "10", // data_db database name to connect to }, - + "stor_db": { - "db_password": "CGRateS.org", + "db_password": "CGRateS.org", }, - + "sessions": { "enabled": true, "routes_conns": ["*localhost"], @@ -29,6 +29,7 @@ "opts":{ // "*processRuns": [ { + "Tenant": "*any", "Value": 2, }, ], @@ -44,28 +45,33 @@ "opts": { "*chargerS": [ { + "Tenant": "*any", "FilterIDs": ["*notstring:~*req.Account:sipp"], "Value": true, }, ], "*rateS": [ { + "Tenant": "*any", "FilterIDs": ["*notstring:~*req.Account:sipp|1001"], "Value": true, }, { + "Tenant": "*any", "FilterIDs": ["*string:~*req.RunID:customers"], "Value": true, }, ], "*accountS": [ { + "Tenant": "*any", "FilterIDs": ["*string:~*req.Account:1001", "*string:~*req.RunID:suppliers"], "Value": true, }, ], "*eeS": [ { + "Tenant": "*any", "Value": true, }, ], @@ -93,9 +99,10 @@ "rate_string_indexed_fields": [], "rate_prefix_indexed_fields": ["*req.Destination"], "opts":{ - "*usage": [ + "*profileIgnoreFilters": [ { - "Value": "1m", + "Tenant": "*any", + "Value": true, }, ], }, @@ -107,6 +114,7 @@ "opts":{ "*usage": [ { + "Tenant": "*any", "Value": "1m", }, ], @@ -130,6 +138,7 @@ "rates_conns": ["*localhost"], "*ignoreErrors": [ { + "Tenant": "*any", "Value": true, }, ], diff --git a/general_tests/session_volume_discount_it_test.go b/general_tests/session_volume_discount_it_test.go index ba9563aca..33a85a5e3 100644 --- a/general_tests/session_volume_discount_it_test.go +++ b/general_tests/session_volume_discount_it_test.go @@ -529,8 +529,9 @@ func testSessVolDiscAuthorizeEventSortRoutes1Min30SecAfterDebiting(t *testing.T) utils.ToR: "*voice", }, APIOpts: map[string]interface{}{ - utils.MetaUsage: time.Minute + 30*time.Second, - utils.OptsRouteS: true, + utils.MetaUsage: time.Minute + 30*time.Second, + utils.OptsRouteS: true, + utils.MetaProfileIgnoreFilters: true, }, } // authorize the session for 1m30s