Commit Graph

1809 Commits

Author SHA1 Message Date
ionutboangiu
0bc94857ca Update empty xml_root_path sanity check case.
Also added tests for it.

Added comment to the *HierarchyPath.AsString() function,
addressing the issue of not being able to retrieve the
element when the root path is equal to the path that
is being processed.
2023-10-16 13:31:14 +03:00
ionutboangiu
734e44d081 Add tests for HierarchyPath.AsString function 2023-10-16 13:31:14 +03:00
ionutboangiu
dd82bb3c4b 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.

Added an integration tes for the special case where the
xml_root_path field is left empty. Before the change it
used to trim the root element from the path slice when
attempting to retrieve a the relative path slice.
2023-10-16 13:31:14 +03:00
NikolasPetriti
d68a0d7e64 Add coverage tests for utils and config 2023-09-06 19:12:15 +03:00
NikolasPetriti
7f9139a544 Add coverage tests for utils and config 2023-09-06 19:12:15 +03:00
arberkatellari
c03b2ae656 Add fatal logs on engine 2023-08-29 16:54:20 +02:00
NikolasPetriti
16c0360ff4 Add coverage tests for utils 2023-08-28 12:18:54 +02:00
DanB
528f36d048 Starting 0.10.4~dev 2023-08-10 10:08:31 +02:00
DanB
2797288111 Release v0.10.3 2023-08-09 17:38:10 +02:00
gezimbll
f18c118cb0 Adding FiltersID field for ExportCdrs api 2023-08-08 17:14:36 +02:00
arberkatellari
85f7198424 Make RandomInteger() return int64 2023-07-21 09:02:55 +02:00
ionutboangiu
1599ed2a5e Improve accuracy of test to assess return of time.Now() 2023-07-18 16:37:06 +02:00
ionutboangiu
2e9653b551 Apply gofmt 2023-07-18 16:37:06 +02:00
NikolasPetriti
7d97e8a99d Add coverage tests for json_codec.go 2023-07-06 13:22:29 +02:00
NikolasPetriti
53e277a57d Add coverage tests for json_codec.go and value_formula.go 2023-07-05 08:33:26 +02:00
DanB
d14bc12e10 Handle CombimedErrNotFound 2023-06-29 14:55:44 +02:00
DanB
3c9f57ce7d Updating CDR *combimed export to support filtering based on originally exported CDR 2023-06-28 12:47:16 +02:00
NikolasPetriti
023cf8f5f2 Added coverage tests for cachecfg.go, datadbcfg.go, erscfg.go, fctemplate.go and rsrparser.go 2023-06-27 11:05:06 +02:00
NikolasPetriti
4c2e81c3a6 Added tests for orderednavigablemap.go, pathitemlist.go and rsrfield.go 2023-06-27 11:05:06 +02:00
NikolasPetriti
65cf7299c8 Added coverage tests for fwvdp.go, objdp.go and removed error variables from source code 2023-06-23 11:55:46 +02:00
NikolasPetriti
86a1fbd531 Coverage tests for fwvdp.go and slicedp.go 2023-06-22 10:39:12 +02:00
NikolasPetriti
40d0cbbca7 Added tests for pathitemlist.go and struct.go 2023-06-21 11:04:43 +02:00
NikolasPetriti
66374bf409 Added tests for struct.go and mapstorage.go, created pathitemlist_test.go file 2023-06-21 11:04:43 +02:00
NikolasPetriti
c7e0432b01 Added coverage tests for mapstorage.go, errors.go and dataprovider.go 2023-06-21 11:04:43 +02:00
NikolasPetriti
da0d7807cb Remove unnecessary error check 2023-06-21 11:04:43 +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
NikolasPetriti
0d1e468fa0 Remove unnecessary error check 2023-06-16 10:23:03 +02:00
NikolasPetriti
75afa538ee Add coverage tests for reflect.go 2023-06-16 10:23:03 +02:00
NikolasPetriti
57a565e459 Added tests for reflect.go 2023-06-16 10:23:03 +02:00
NikolasPetriti
45105cfbac Covered tests for pathitem.go and dataconverter.go 2023-06-16 10:23:03 +02:00
NikolasPetriti
c87644a451 Cover all slice.go tests 2023-06-13 10:26:38 +02:00
NikolasPetriti
d4527b4691 covered testing for map.go 2023-06-13 10:26:38 +02:00
NikolasPetriti
c62eb7bd7a Add tests for concureqs.go 2023-06-13 10:26:38 +02:00
ionutboangiu
62619ba3a5 Replace interface{} with any 2023-06-05 10:55:32 +02:00
ionutboangiu
c83d097e9e Remove duplicate implementation 2023-05-25 08:58:05 +02:00
ionutboangiu
5f890881f0 Implement generic OrderedMap to keep track of csv/fwv record order 2023-05-25 08:52:32 +02:00
ionutboangiu
c7914f3bb3 Implement generic OrderedMap to keep track of csv/fwv record order 2023-05-25 08:41:26 +02:00
ionutboangiu
259fb83c47 Add the implementation for Sleep api in sessions/sessions.go
Before the implementation was done directly in the SessionSv1 method. The argument definition
was also moved from apier/v1 to utils.
2023-05-03 10:02:15 +02:00
ionutboangiu
cb7ea790de Update rpcclient library to latest version
Replace all instances of rpcclient.ClientConnector with birpc.ClientConnector.

Pass context, maxReconnectInterval, delayFunc and birpcClient to rpcclient
constructors.

Remove redundant time.Duration conversions (e.g. time.Duration(1*time.Second)
now becomes time.Second.

Add context where needed (context.Background() for tests, context.TODO()
for places where it should be passed from somewhere else).

Implement that functionality of the SessionSv1.Sleep call, in sessions/sessions
instead of apier/v1.

Make changes in utils/server.go (replacing the old rpc2 library with github.com/cgrates/birpc).

Change the way we register birpc methods for sessions in services, using a helper function
defined in engine/libengine.go.
2023-05-03 10:02:15 +02:00
gezimbll
7dcbd09a1f replacing non-meta constants for storage types 2023-03-08 19:14:24 +01:00
adi
c9a9857152 Added relevant paratheses 2022-12-02 18:39:29 +02:00
ionutboangiu
1436bac61c Remove unnecessary paranthesis 2022-12-02 14:24:18 +02:00
ionutboangiu
a748ab629e Apply gofmt simplify code 2022-12-02 14:24:18 +02:00
ionutboangiu
82468c580d Replace deprecated ioutil library, remove redundant statements + small optimizations 2022-12-02 14:24:18 +02:00
adi
98a044b3fe Started to add reverse filter indexes 2022-11-30 15:08:57 +02:00
adi
1fe0dcbe9a Changed FileName variable for ers 2022-11-20 18:46:36 +01:00
ionutboangiu
758a94280a Apply project wide fmt 2022-11-16 10:13:44 +01:00
adi
a6445f641e Displays messages for agents when connect + fixes on call tests 2022-11-11 17:04:59 +01:00
ionutboangiu
22f9ec262e Update most of the libraries 2022-11-09 14:04:58 +01:00