Commit Graph

5472 Commits

Author SHA1 Message Date
gezimblliku
04f2c69b05 updated dependencies with the latest versions 2024-08-22 20:39:59 +02:00
ionutboangiu
8426892ac6 revise integration tests script 2024-08-21 20:59:10 +02:00
ionutboangiu
0f70af84e9 centralize test flags for shared use across tests 2024-08-15 18:17:33 +02:00
ionutboangiu
9d59e88552 Add the test suite
Similar to the one from v0.11. Has different csv loading logic and passes
context.
2024-08-15 18:17:33 +02:00
ionutboangiu
0dfb3b860d Centralize RPCClient constructor 2024-08-15 18:17:33 +02:00
ionutboangiu
7c5d56c1de Combine csv loader tests
- ensures the tpreader is not eating memory even when tests are
not being run (before it was being constructed in an init())
2024-08-15 18:17:33 +02:00
gezimblliku
73a7590f1c added profiles,configs and services for trend && ranking 2024-08-02 09:37:52 +02:00
arberkatellari
ac96e53c43 Update rpcclient revising error handling 2024-06-30 17:55:59 +02:00
gezimbll
27c4242c52 renamed newservice2 function to newservicewithping 2024-06-07 17:18:23 +02:00
gezimbll
3ff0e6e5a1 revising integration tests 2024-06-07 17:18:23 +02:00
gezimbll
07ea67e638 update threshold to set snooze time after actions 2024-05-09 12:33:32 +02:00
gezimbll
368c046805 added *http filter type 2024-02-09 15:59:00 +01:00
gezimbll
b3956da736 Added new filter *contains 2023-12-19 16:03:35 +01:00
gezimbll
c51122fd20 Moving apis into each subsystem packages 2023-12-13 20:33:09 +01:00
ionutboangiu
555a143b79 Take out cdrID from SetCDR parameters 2023-12-12 10:09:18 +01:00
ionutboangiu
d29f84169c Move cdrs to its own package
Moved engine/cdr.go to utils/cdr.go.
Moved engine/cdrs.go and engine/cdrs_test.go to cdrs package.
Moved api functions from cdrs/cdrs.go to cdrs/apis.go. Same for the
tests.
Deleted CDRsV1 type and its methods.
2023-12-12 10:09:18 +01:00
ionutboangiu
1cec3751e4 Update SetCDR signature to include the cdrID
Updated mongo indexing for cdrs to take into consideration only the
opts.*cdrID field.

Fixed cdrs_it_test.go test.

Before storing CDRs in CDR processEvents, we are now temporarily generating
the *cdrID in APIOpts (until we decide where this should happen).
2023-12-12 10:09:18 +01:00
ionutboangiu
2ccd6ca74d Add context.Context in SetCDR func signature 2023-12-12 10:09:18 +01:00
ionutboangiu
ab26ba2d02 Implement RemoveCDRs for MongoStorage (untested and not optimized) 2023-12-12 10:09:18 +01:00
ionutboangiu
fb6b38850c Update mongo SetCDR method to take into account allowUpdate param 2023-12-12 10:09:18 +01:00
ionutboangiu
560f42bf8d Add store block back inside *CDRServer.processEvents
Added *store and *rerate dynamic opts for cdrs.
2023-12-12 10:09:18 +01:00
gezimbll
3fe5f70dc9 Adding OneEvent functionality for stats 2023-12-07 17:44:33 +01:00
ionutboangiu
f0852b645b Rename composeURI func to composeMongoURI
To reflect that it's used exclusively for MongoDB (for now at least).

Also added a descriptive comment to the function.
2023-12-07 16:56:08 +01:00
ionutboangiu
8909786a4b Revise buildURL function
Renamed to composeURI.

Use simple string concatenation to build URI because there is
no need to keep the Parse call as a validation step. Any issue
would be caught when establishing a connection.
2023-12-07 16:56:08 +01:00
gezimbll
cc07c5366a Revise integration tests 2023-11-29 16:25:18 +01:00
gezimbll
ac32b7ce60 Added function to cast custom map types 2023-11-29 16:25:18 +01:00
gezimbll
3403a91a2b Revise integration tests 2023-11-29 16:25:18 +01:00
ionutboangiu
031cf1fe43 Add rpc caching for ProcessStoredEvents API 2023-11-29 16:22:58 +01:00
ionutboangiu
6826f13cc5 Update CDR processEvent to process multiple CGREvents 2023-11-16 15:38:18 +01:00
ionutboangiu
a817f30c2a Rename PrepareFilters to GetFilters 2023-11-16 15:38:18 +01:00
ionutboangiu
f5d69cb41b Implement ProcessStoredEvents API 2023-11-16 15:38:18 +01:00
ionutboangiu
26cdb571b8 Upgrade MongoDB driver to 1.13
- 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 (deprecated since 1.12).
- 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-11-14 18:24:21 +01:00
ionutboangiu
e5ab21def5 Implement AdminSv1 Get/RemoveCDRs APIs for CDRs
Addition of storDB to AdminSv1 was required.
2023-11-09 20:50:36 +01:00
ionutboangiu
d5039b3ce8 Add CDRs CRUD queries back and remove TP functions 2023-11-09 20:50:36 +01:00
ionutboangiu
d7679e2e9a Add negative filters to filter type string sets 2023-11-09 20:50:36 +01:00
gezimbll
32ed816de7 Replacing IsSliceMember ,CloneStringSlice and SliceStringEqual with slices package functions 2023-11-01 21:38:27 +01:00
ionutboangiu
65310e7437 Move benchmark relying on redis to it_test file 2023-10-27 18:52:05 +02:00
gezimbll
c6571492fc Make go vet pass 2023-10-26 15:59:34 +02:00
ionutboangiu
4c34d321de 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 isAbsolute is set to true, when calling the AsString
method on a nil HierarchyPath, only the separator will
be returned. Alternatively, if isAbsolute is false, it
will just return . to signal that the path currently
being processed is the one required.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 xmlRootPath. The field
will remain commented in config_defaults for reference.

Add tests for HierarchyPath.AsString function.

Add comments for XmlProvider and xmlRootPath opt.

Update XmlProvider String() func based on the comment
which specifies that it should display the already
parsed values out of cache.
2023-10-19 17:19:30 +02:00
ionutboangiu
efcb32741a Run gofmt 2023-09-28 20:48:39 +02:00
NikolasPetriti
61a781675c Fix comment in models 2023-08-29 17:00:14 +02:00
NikolasPetriti
039b4269e8 Add tests for msgpack encoding/decoding for all basic go types that we are using in 1.0 2023-08-29 17:00:14 +02:00
NikolasPetriti
512f0a7c2d Revise struct tags for tp models 2023-08-29 17:00:14 +02:00
arberkatellari
770454c007 Renew DlgList, DNSAgent & add SRV/A support 2023-08-28 12:27:53 +02:00
gezimbll
5b5a159706 Added sentrypeer filter type 2023-08-02 16:49:33 +02:00
arberkatellari
d501e3d34a Add coverage tests in engine 2023-05-31 17:03:50 +02:00
arberkatellari
4cc5fa8a01 Add coverage tests for engine 2023-05-31 17:03:50 +02:00
arberkatellari
245a27acb1 Add coverage tests for engine 2023-05-31 17:03:50 +02:00
ionutboangiu
113e2a2bdf Replace interface{} with any 2023-05-31 10:22:28 +02:00
arberkatellari
61fa86126f Add coverage tests for engine 2023-05-25 08:51:59 +02:00