Commit Graph

12918 Commits

Author SHA1 Message Date
gezimbll
c2dacc42c1 Removed warnings from go staticcheck 2023-11-08 17:10:13 +01:00
gezimbll
529430bd4d added tests for debiting data units without ratingsubject 2023-11-08 17:04:41 +01:00
gezimbll
9e2a629b82 Add *log flag for logging ees events 2023-11-08 16:52:38 +01:00
Varun Dhand
c4fefedefa fix: typo in rjreader.go 2023-11-02 19:40:53 +01:00
Varun Dhand
0997d308ee Update CONTRIBUTORS.md 2023-11-02 19:40:53 +01:00
Varun Dhand
6baffaa67c fix: typo in rjreader.go 2023-11-02 19:40:53 +01:00
gezimbll
2d137915c1 Avoid potential deadlock in session test 2023-11-02 19:40:03 +01:00
ionutboangiu
d241f5deee Add test for balance blocker functionality
References issue #4163 and PR #4178.
2023-11-02 19:38:24 +01:00
ionutboangiu
3e852be287 Update it test to set up environment using setupTest()
This has been done in order to check the newly implemented helpers'
functionality.
2023-11-02 19:38:24 +01:00
ionutboangiu
ada0d948b6 Implement helper functions for setting up test environment 2023-11-02 19:38:24 +01:00
gezimbll
5a85c119c8 Replacing IsSliceMember ,CloneStringSlice and SliceStringEqual with slices package equivalent functions 2023-11-01 21:52:50 +01:00
ionutboangiu
6722d6b6a4 Remove unused DryRun field from CallDescriptor
dryRun vars will also not be considered anymore in the balance
blocker condition.

Fixes #4163
2023-11-01 21:37:32 +01:00
ionutboangiu
1a19fddda1 Update failing integration tests due to changes
libengine_it_test.go:
 - handle postgres dbtype as well
 - after rpcclient update, we receive context deadline exceeded
 instead of REPLY_TIMEOUT, so the expected value had to be
 updated.

tut_smgeneric_it_test.go
 - an additional attribute profile has been added to oldtutorial
 tariffplans, which changed the amount of profiles and indexes
 existing in the storage when testing. Expected values have been
 updated.
2023-10-27 18:51:01 +02:00
ionutboangiu
88f31c189d Optimize CDRs unit test (12s->1s) 2023-10-27 18:51:01 +02:00
ionutboangiu
a9828b5d03 Revise integration_test.sh script 2023-10-27 18:51:01 +02:00
ionutboangiu
4ca66ed6c4 Update *ec template values in test ee configuration
*ec.CostDetails.EventCostField -> *ec.EventCostField
2023-10-27 18:51:01 +02:00
ionutboangiu
38578524da Upgrade MongoDB driver to v1.12
- Set (but comment) serverAPI options (currently distinct api and
create.size BSON field are deprecated + possible others that are untested)
- Remove the custom time decoder used for mongo BSON
datetime values. The custom decoder was only converting these values
into UTC and was not any different from the default time.Time
decoder in the MongoDB driver, which also handles BSON string, int64,
and document values.
- Implement 'buildURL' function to connect to mongo (can also be
used for mysql and postgres)
- Update function names, variable names, and comments for clarity
- Replace 'bsonx.Regex' with the Regex primitive for v1.12 compatibility
- Use simple concatenation instead of Sprintf
- Declare 'decimalType' locally, replace global 'decimalType'
- Simplify several functions without altering functionality
- Converting directly from a D to an M is deprecated. We are now decoding
  directly in a M.
- Used errors.As and errors.Is for proper error comparison and assertion
- Revised sloppy reassignments and added missing error checks
2023-10-27 18:51:01 +02:00
ionutboangiu
d1d43913c8 Replace deprecated Publish method with PublishWithContext 2023-10-27 18:51:01 +02:00
arberkatellari
c4e0d92a2a Make DNS TLS error log more suggestive 2023-10-26 18:02:14 +02:00
ionutboangiu
b270112425 Update README links to docs 2023-10-26 15:55:54 +02:00
ionutboangiu
ec799dd1e9 Update expected value in kafka it test 2023-10-26 15:55:54 +02:00
ionutboangiu
9f3f4058b2 Bump mongodb version in ansible role 2023-10-26 15:55:54 +02:00
ionutboangiu
62b27b569f Make EventCost type vars satisfy the DataStorage interface 2023-10-26 15:55:54 +02:00
gezimbll
969ef4b754 Make go vet pass 2023-10-26 15:52:06 +02:00
gezimbll
16a9c7033f Remove unreachable err cases from HandleJSONErr
json.UnmarshalError happens only when we pass a non-nil pointer, which
is not the case for us. Usage of go vet helps us make sure it also
won't be happening in the future.
2023-10-26 15:52:06 +02:00
gezimbll
9df5f2e02e Added EventCost FieldAsString tests 2023-10-26 15:52:06 +02:00
arberkatellari
5872b810ec Change default storedb password 2023-10-25 10:16:07 +02:00
ionutboangiu
c4664c69c4 Replace nightly with master for deb install 2023-10-19 17:20:00 +02:00
ionutboangiu
6e182f64c1 Update kafka handler to run with sudo 2023-10-19 17:20:00 +02:00
ionutboangiu
1c0ca857ee Update libraries and fix compilation errors 2023-10-17 17:40:43 +02:00
ionutboangiu
7cc5dfb26d Update test for XmlProvider String() func 2023-10-17 17:40:43 +02:00
ionutboangiu
37ac937f97 Handle kafka topic creation/deletion within test 2023-10-17 17:40:43 +02:00
ionutboangiu
5ce0e8dfa5 Update kafka ansible role
- use kraft instead of zookeeper
- add handlers in case of cfg changes
- create a separate user for the kafka service
- bump kafka version
- make the role more configurable
2023-10-17 17:40:43 +02:00
ionutboangiu
1d8d9823fe Delete irrelevant test after xml update 2023-10-17 17:40:43 +02:00
ionutboangiu
63e06dd86a Update XmlProvider String() func
The comment specifies that it should display the already parsed values
out of cache.
2023-10-17 17:40:43 +02:00
ionutboangiu
889ec93288 Rename prefix to isAbsolute inside HP.AsString() 2023-10-17 17:40:43 +02:00
ionutboangiu
12779560ca Handle empty relative path case in HP.AsString()
Return '.' when HierarchyPath is empty and prefix is false.
2023-10-17 17:40:43 +02:00
ionutboangiu
36bbcbc2e1 Update rabbitmq role for latest debian/ubuntu compatibility 2023-10-16 18:57:48 +03:00
ionutboangiu
55c3730cda Update AMQP message processing loop
Previously, msg.Ack(true) was used, which is mostly used for batch
processing. It mistakenly acknowledged all previously unacknowledged
messages, causing errors from the AMQP server. Now, messages are
acknowledged individually after each one is processed.

Messages that ERs failed to process are now rejected and requeued
for future processing attempts.

The reader is now closed immediately if the message delivery
channel closes. Therefore, it prevents an endless loop by avoiding
continuous consumption from empty or closed channels.

Addresses: #4146
2023-10-16 18:04:17 +03:00
arberkatellari
d7aabe20e3 Continue test for rerating through ers 2023-10-16 13:35:30 +03:00
arberkatellari
e3915b2009 Correct test and add test for rerating CDRs using ERs 2023-10-16 13:35:30 +03:00
gezimbll
d560152d55 Improving internal storage coverage tests 2023-10-16 13:34:55 +03:00
ionutboangiu
4245740b31 Update github workflows to use correct go version 2023-10-16 13:18:12 +03:00
ionutboangiu
6c41ebe0de Add sanity check to prevent xml reader panic
HierarchyPath parser now returns nil when
the path is empty (instead of a string slice with one
EmptyString element).

If the prefix is set to true, when calling the AsString
method on a nil HierarchyPath, only the separator will
be returned. This avoids a nil expr error coming from
the xmlquery library.

Use the Query and QueryAll functions from the xmlquery
package to be able to handle the errors ourselves and
avoid panics.

Remove config default value for xml_root_path. The field
will remain commented in config_defaults for reference.

Add tests for HierarchyPath.AsString function.

Add comments for XmlProvider and xml_root_path opt.
2023-10-16 13:18:12 +03:00
gezimbll
405f29ca00 added internal storage tests 2023-10-12 15:06:04 +02:00
ionutboangiu
27c6d503a5 Bump go version and update checksum 2023-10-12 11:10:01 +02:00
arberkatellari
47e75fab13 Update radigo, add multiple folder functionality 2023-10-11 11:18:32 +02:00
gezimbll
055578b642 Added tests for dataconverters on attributes 2023-10-10 19:58:17 +02:00
ionutboangiu
947fc13e01 Update deb_packages ansible playbook
Adjusted rng-tools binary path.
Removed redundant distribution, since we can just use the branch
directly.
2023-10-09 21:09:27 +02:00
ionutboangiu
84cdf743bd Bump go version 2023-10-09 21:09:27 +02:00