106 Commits

Author SHA1 Message Date
arberkatellari
119481b3d1 Update ERs SQL functionalities 2025-10-13 09:58:45 +02:00
ionutboangiu
e05be683ae change license from GPLv3 to AGPLv3 2025-10-13 09:57:41 +02:00
ionutboangiu
c895681980 Improve CoreSv1.Status API with more detailed metrics
- add new metrics (off by default)
- add Debug boolean option for full metric details
- add Timezone option for 'running_since' field
- update default metrics shown and their constants
- remove utils.GetStartTime(), now use process metrics
2024-11-03 13:19:45 +01:00
ionutboangiu
176c91764f SplitPath: stop at '#' for nesting separator 2024-11-03 13:19:45 +01:00
ionutboangiu
aa5069e16e Remove go type limits constants
They can be retrieved directly from the std math package.
Slightly optimize the Fib functions and improve comments.
2024-09-05 20:46:40 +02:00
ionutboangiu
79f824c575 Add support for Git 2.45+ iso-strict date format
Git 2.45+ introduced a backward incompatible change in the iso-strict
date format, showing time in the Zulu timezone with Z suffix instead
of +00:00. This commit adds parsing for the new date format before
falling back to the old format.

Revise GetCGRVersion error messages.
Revise GetCGRVersion unit test.
2024-06-30 17:54:25 +02:00
Bas Couwenberg
915733e04e Pass commit date and hash to -ldflags separately. 2024-02-27 16:27:07 +01:00
ionutboangiu
6b831d3ba3 Make Paginate function generic
Also move the paginator implementation and its tests to their
own files.
2023-11-09 20:50:36 +01:00
ionutboangiu
6bcc374d45 Update EndOfMonth coreutils test 2023-10-19 17:19:30 +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
113e2a2bdf Replace interface{} with any 2023-05-31 10:22:28 +02:00
arberkatellari
8abd4d93c4 Improving coverage at utils 2022-11-18 11:48:24 +01:00
arberkatellari
320c179fee Improving coverage at utils 2022-11-16 11:55:25 +01:00
arberkatellari
9cf7e38eb6 Improving coverage at utils 2022-11-16 11:55:25 +01:00
ionutboangiu
09c6261903 Fix issue where fib function overflows 2022-08-05 14:30:45 +02:00
ionutboangiu
4857245aa5 Use copy instead of loop + other staticcheck fixes 2022-07-15 09:28:57 +02:00
ionutboangiu
70ea038f08 Update FibDuration function 2022-07-03 13:08:52 +02:00
andronache98
ecdf5e54ea Changed headers 2022-03-09 14:14:30 +01:00
andronache98
9ec56f5155 Changed headers 2022-03-09 14:14:30 +01:00
ionutboangiu
3ff0a3fafb Move pagination tests to the appropriate file 2022-01-13 17:24:22 +01:00
Trial97
d1eb628fc1 Added unit tests for account set method 2021-12-21 15:05:44 +01:00
Trial97
876955f9e2 Started redesigning loaders 2021-11-16 13:05:40 +01:00
nickolasdaniel
88e07e0f5d Unit tests in utils 2021-11-04 20:07:54 +02:00
ionutboangiu
7b7d46251a Implement new function that splits filter rules 2021-07-23 10:59:18 +02:00
nickolasdaniel
9fa61de229 Added FirstIntNonEmpty and FirstDurationNonEmpty functions in utils 2021-07-16 17:15:05 +02:00
nickolasdaniel
f2e5c2f9c2 Added unit tests in utils 2021-05-12 15:08:43 +02:00
Trial97
c04c0a5adb Added ConfigDB and option to read config from DB 2021-04-16 17:53:36 +02:00
Trial97
3406d3c7c9 Updated based on new rpc library 2021-04-13 13:35:03 +02:00
Trial97
b028a99050 Removed rals config 2021-04-01 16:36:51 +02:00
nickolasdaniel
25aa473907 Coverage tests for utils 2021-03-29 14:35:05 +02:00
Trial97
b8437f4a7d Updated utils tests 2021-03-26 13:46:25 +01:00
andronache
a6f41adaf9 Replaced TenantIDWithOpts with TenantIDWithAPIOpts 2021-03-18 13:04:28 +01:00
andronache
635bdd88b8 Replaced ResourceWithCache with ResourceProfileWithOpts in apier 2021-03-17 13:46:33 +01:00
andronache
c2bd07a44b Changed TenantIDWithCache to TenantIDWithOpts 2021-03-17 13:46:33 +01:00
ionutboangiu
278e583bf6 Switch expected with received 2021-03-16 13:13:37 +01:00
ionutboangiu
f36b543df3 Cover functions in utils/librates.go 2021-03-10 17:50:20 +01:00
ionutboangiu
3b4958c4bb Cover the remaining of utils/coreutils.go 2021-03-10 17:50:20 +01:00
ionutboangiu
1abefde24c Cover BiRPCCall func in utils/coreutils.go 2021-03-10 17:50:20 +01:00
ionutboangiu
d6462f5df4 Cover part of BiRPCCall in utils/coreutils.go 2021-03-09 17:27:28 +01:00
andronache
3e51f58d8c Changed consts in utils 2021-01-11 10:57:44 +01:00
andronache
1d0a814e42 Changed consts in utils 2021-01-11 10:57:44 +01:00
andronache
4ff3b9242d Consts in utils 2021-01-07 18:15:35 +01:00
andronache
1470267727 Modified consts in utils 2021-01-07 18:15:35 +01:00
andronache
570356b459 Changed consts in utils and repaired account profiles it testin apier/v1 2021-01-07 18:15:35 +01:00
porosnicuadrian
0e5cdebd69 Integration and unit tests for utils+splitted some functions for coverage 2020-12-03 20:37:17 +01:00
Trial97
c539800acd Added more Clone functions for config sections 2020-11-27 08:41:56 +01:00
Trial97
2b19127d05 Added more Clone functions for config sections 2020-11-27 08:41:56 +01:00
andronache
56f9d16cc0 Added tests in utils 2020-11-26 12:25:05 +01:00
andronache
811884db62 Added coverage tests to utils 2020-11-12 17:59:06 +01:00
andronache
6923d1675e Added tests to utis 2020-11-12 17:59:06 +01:00