Commit Graph

4166 Commits

Author SHA1 Message Date
ionutboangiu
d7c6afb82a Revert "Revise syntax for the struct tag values pointed out by go vet"
This reverts commit 9c16f9da5a.
Fixing struct tag values is causing some tests to fail. An issue has
been opened internally which talks in depth about the issue.
2023-07-18 16:37:06 +02:00
ionutboangiu
49bf8abc53 Fix a couple more go vet errors 2023-07-18 16:37:06 +02:00
ionutboangiu
ae67776d30 Make sure no loop variables are captured by func literals 2023-07-18 16:37:06 +02:00
ionutboangiu
c4e820457b Revise syntax for the struct tag values pointed out by go vet 2023-07-18 16:37:06 +02:00
ionutboangiu
2e9653b551 Apply gofmt 2023-07-18 16:37:06 +02:00
NikolasPetriti
95b99614d5 Add coverage tests for balance_filter.go and storage_interface.go 2023-07-14 17:09:31 +02:00
NikolasPetriti
62a8601131 Add coverage tests for balances.go and calldesc.go 2023-07-14 11:27:32 +02:00
NikolasPetriti
df9947730c Add coverage tests for balances.go, resources.go and storage_utils.go 2023-07-13 10:23:31 +02:00
NikolasPetriti
710a8d78be Add coverage tests for filters.go 2023-07-13 10:23:31 +02:00
ionutboangiu
628df25caa Set TimeNotBuiltin msgpack option directly without using BasicHandle
Prevents a situation where when attempting to decode a string into a nil
interface, the decoded value would be the encoded slice of bytes instead
of the string we need.
2023-07-12 17:06:16 +02:00
ionutboangiu
9cea5f1f60 Make msgpack codec backwards compatible with version before 2017 2023-07-10 13:58:21 +02:00
NikolasPetriti
55585a34f2 Revise failing test 2023-07-04 13:20:06 +02:00
ionutboangiu
b5dbb31163 Clean up and refactor after mongo update
- 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
- Streamlined function parameters and removed redundancies
- Revised sloppy reassignments and added missing error checks
- Shortened and reorganized function structure for improved readability
2023-07-04 13:19:31 +02:00
ionutboangiu
076bb172f1 Remove custom time decoder for MongoDB
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.
2023-07-04 13:19:31 +02:00
ionutboangiu
a7c785d925 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)
- Rename and refactor 'TimeDecodeValue1' to 'decodeTimeValue', add
nil case handling
- 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 'timeType' locally, replace global 'tTime'
- Use 'RegisterTypeDecoder' to replace deprecated 'RegisterDecoder'
- Simplify several functions without altering functionality
- Remove redundant 'storageType' field in 'mongoStorage',
use 'isDataDB' instead
2023-07-04 13:19:31 +02:00
DanB
d14bc12e10 Handle CombimedErrNotFound 2023-06-29 14:55:44 +02:00
DanB
1860c301d3 Adding debug for combimed 2023-06-29 12:58:06 +02:00
DanB
84331962a8 Removing debug logs, apply lazy filters in case of *combimed 2023-06-28 15:17:20 +02:00
DanB
d33fe252d2 Adding debug log for filters 2023-06-28 14:16:14 +02:00
DanB
6c007c3bd3 Properly defining filter prefixes for *combimed export 2023-06-28 12:58:23 +02:00
DanB
3c9f57ce7d Updating CDR *combimed export to support filtering based on originally exported CDR 2023-06-28 12:47:16 +02:00
ionutboangiu
b7d172f78a Fix misspellings 2023-06-21 11:02:39 +02:00
ionutboangiu
3935a72605 Remove executable bit from .go files 2023-06-16 10:24:13 +02:00
ionutboangiu
62619ba3a5 Replace interface{} with any 2023-06-05 10:55:32 +02:00
ionutboangiu
fbfb9fddd0 Revise exporter fields for fwv unit test 2023-06-05 10:55:32 +02:00
gezimbll
de2eaec25a Fixing tpexporter initialization of slices && testing errors for tpexporter 2023-05-31 10:21:02 +02:00
arberkatellari
43daf3efe5 Add error handler for Mongo GetCDrs remove 2023-05-25 11:35:53 +02:00
ionutboangiu
c7914f3bb3 Implement generic OrderedMap to keep track of csv/fwv record order 2023-05-25 08:41:26 +02:00
gezimbll
bda68b7a0d Revert slice initializiation with append 2023-05-24 09:59:41 +02:00
arberkatellari
e3cd50c26d Add case for AsExportMap field types 2023-05-23 08:20:37 +02:00
gezimbll
4e6da29569 Update toExportMap to initialize the slices with make() 2023-05-23 08:19:57 +02:00
gezimbll
a2633a7fd7 Improving coverage test at engine 2023-05-22 07:54:12 +02:00
ionutboangiu
a3a8c5a4a4 Make the FCTmpl.RoundingDecimals field a pointer
The purpose of this is to check whether RoundingDecimals was set from the fields configuration.
If it wasn't, we are going to be using the RoundingDecimals dictated by the general subsection.
2023-05-22 07:53:47 +02:00
ionutboangiu
6a6fefd0cd Improve cost formatting and parsing for CDRs
The FormatCost function in cdr.go now accepts an additional parameter of type *config.RSRParser. This is
then used to extract the value from its path as opposed to always using the value of the Cost field directly.

Improved the unit test for the FormatCost function. Now it has become a table-driven test and it handles
cases when the cost is retrieved from different fields other than  from the CDR.
2023-05-22 07:53:47 +02:00
gezimbll
b357dfa0df Improving coverage test at engine 2023-05-18 19:29:24 +02:00
gezimbll
021c860a81 Improving coverage tests at engine 2023-05-18 19:29:24 +02:00
gezimbll
4bfdebd48f Improving coverage tests at engine 2023-05-18 19:29:24 +02:00
gezimbll
00961123ff Improving coverage tests at engine 2023-05-18 19:29:24 +02:00
gezimbll
dc2741c025 Improving coverage tests 2023-05-10 10:40:13 +02:00
gezimbll
f67c9e2455 Improving coverage tests at engine 2023-05-10 10:40:13 +02:00
ionutboangiu
25fa01fee0 Solve compilation errors after library update 2023-05-07 19:25:19 +02:00
gezimbll
e142f5efd7 Improving coverage tests 2023-05-03 10:03:35 +02:00
gezimbll
f62dea0768 Improving coverage for unit tests 2023-05-03 10:03:35 +02:00
gezimbll
a86d01be6b Improving coverage tests at engine 2023-05-03 10:03:35 +02:00
gezimbll
569c59af53 Improving coverage of unit tests 2023-05-03 10:03:35 +02:00
gezimbll
47e1d470cd Improving coverage of unit test 2023-05-03 10:03:35 +02:00
gezimbll
9f56532a4c Improving coverage of unit tests 2023-05-03 10:03:35 +02:00
gezimbll
c4ca1d1315 Improving coverage of unit test 2023-05-03 10:03:35 +02:00
ionutboangiu
d8464ce023 Update libraries 2023-05-03 10:02:15 +02:00
ionutboangiu
85cc7e03f0 Enable bijson support for SessionSv1 service
Add bidirectional support for sessions while maintaining changing the
current rpc service registration method. Modified methods in
sessionsbirpc.go file to satisfy the birpc.ClientConnector interface
and removed BiRPC prefix before creating the service that's to be
registered.
2023-05-03 10:02:15 +02:00