Commit Graph

13225 Commits

Author SHA1 Message Date
arberkatellari
f356695f6f Add active sessions backup functionalitiy 2024-06-12 18:21:50 +02:00
gezimbll
7e3b1b7052 increased time.sleep for cache to remove on ttl 2024-06-12 14:53:30 +02:00
gezimbll
1c1d211c7c added config,service for sags 2024-06-12 14:53:30 +02:00
armirveliaj
f707236a37 Add unit test on utils 2024-06-11 18:49:39 +02:00
armirveliaj
bc531f8b5a Add unit test on migrator 2024-06-11 18:49:39 +02:00
armirveliaj
62a20d1ce8 Add new unit tests on services 2024-06-11 18:49:39 +02:00
ionutboangiu
d31b4d0984 Add engine flag to print the config object in JSON format
Removed the redundant check_config engine flag. Config sanity was
checked by the NewCGRConfigFromPath function.
2024-06-11 18:34:02 +02:00
gezimbll
8103cd4c9f renamed sarS api&&register the sarS service to servmanager 2024-06-11 10:21:51 +02:00
gezimbll
86df598920 Implemented service,config and api for Sars 2024-06-11 10:21:51 +02:00
armirveliaj
ed9ac8965f Add unit tests on engine 2024-06-10 18:52:59 +02:00
gezimbll
7a32176f09 update rals flag to false when using refund 2024-06-10 13:00:02 +02:00
Bas Couwenberg
261374be0e Don't recursively change ownership of package directories. 2024-06-10 12:00:48 +02:00
armirveliaj
a4edc5dfca Revise and add new test case on engine 2024-06-07 17:17:54 +02:00
armirveliaj
336b85e5dc Add new unit tests on engine 2024-06-07 17:17:54 +02:00
gezimbll
8bf51a6112 added URLEncoder data converter 2024-06-07 16:40:54 +02:00
gezimbll
2293f7f66d added urldecode data converter 2024-06-07 16:40:54 +02:00
ionutboangiu
2980775e67 Revise test for ReplayFailedPosts API
- shortened the failed post cache ttl to 1ms to simulate with more
than one events file
- use the default FailedPath (which is the same as SourcePath) to check
whether writing events that failed to be replayed to the same path
would cause an infinite loop.
2024-06-07 16:32:49 +02:00
ionutboangiu
b7dacfe8a6 Revise APIerSv1.ReplayFailedPosts API + tests
- renamed parameter type: ArgsReplyFailedPosts -> ReplayFailedPostsParams
- renamed param fields:
  - FailedRequestsInDir -> SourcePath
  - FailedRequestsOutDir -> FailedPath
- changed param fields types from *string to string
- used the SourcePath and FailedPath params directly instead of creating separate variables
- used filepath.WalkDir instead of reading the directory and looping over the entries
- used slices.ContainsFunc to check if the file belongs to any module (if 1+ is specified)
- used filepath.Join instead of path.Join
- used the path provided by WalkFunc instead of building the file paths ourselves
- made error returns more descriptive
- added logs for directories/files that are skipped
- paths that cannot be accessed are skipped after logging the error
2024-06-06 13:30:14 +02:00
ionutboangiu
89f97d45e1 Bump version in nats ansible role + formatting 2024-06-06 13:30:14 +02:00
ionutboangiu
5ca6898cb4 Update integration test setup helpers
- Pass the testing.T variable to all the helpers.
- Fail directly using t.Fatal instead of returning errors and
  checking them in the parent function.
- Use t.Cleanup to ensure engine is closed after the test instead
  of returning a shutdown function and using it with defer.
- Use t.TempDir to create temporary directories for configuration
  and tariffplans
- Add t.Helper() method call to all helper functions.
2024-06-06 13:30:14 +02:00
ionutboangiu
1485e77d55 Add workflow step to set up debug session (commented) 2024-06-06 13:30:14 +02:00
ionutboangiu
448eea3918 Format some ansible roles 2024-06-06 13:30:14 +02:00
ionutboangiu
c32de12cee Reduce client connection attempts to test engine status (tests)
200 -> 16

Previously, considering the fibonacci back off strategy, if engine failed to
start it would have tried to attempt connections for 2.862799e+33 years.

Now, the amount of attempts is 16, equivalent to around 2 and a half seconds.
Should be more than enough, considering that usually 6-7 attempts are enough.
2024-06-06 13:30:14 +02:00
armirveliaj
f1d0be170d Revise and Add new unit tests on engine 2024-06-06 13:17:59 +02:00
armirveliaj
e20200c30a Revise and Add new unit tests on agents 2024-06-06 13:17:59 +02:00
armirveliaj
36c623599e Add new unit tests on engine 2024-06-06 13:17:59 +02:00
armirveliaj
eba876eec8 Add new unit test on agents 2024-06-06 13:17:59 +02:00
armirveliaj
b4f889247f Add unit tests on utils 2024-06-06 13:17:59 +02:00
armirveliaj
044e56a6a4 Add unit tests on engine 2024-06-06 13:17:59 +02:00
armirveliaj
ae7c27da0a Add unit tests on agents 2024-06-06 13:17:59 +02:00
armirveliaj
23d6820253 Add unit tests on agents 2024-06-06 13:17:59 +02:00
armirveliaj
8992da64b4 Revise unit test on ees 2024-06-06 13:17:59 +02:00
armirveliaj
09e9939482 Add unit tests on ees 2024-06-06 13:17:59 +02:00
armirveliaj
3863a37ecb Add unit tests on dispatchers 2024-06-06 13:17:59 +02:00
armirveliaj
0a5645bd28 Add unit tests on agents 2024-06-06 13:17:59 +02:00
armirveliaj
0e82785173 Add unit tests on engine 2024-06-06 13:17:59 +02:00
armirveliaj
39e3d04fe5 Add new unit tests in engine 2024-06-06 13:17:59 +02:00
armirveliaj
68f1663688 Add new unit tests in migrator 2024-06-06 13:17:59 +02:00
armirveliaj
58dc0f0ae2 Revise unit tests in engine 2024-06-06 13:17:59 +02:00
armirveliaj
70f4f44421 Add Unit Tests for Engine 2024-06-06 13:17:59 +02:00
armirveliaj
cc98314426 Add unit tests for Dispatcher,Engine,Agents 2024-06-06 13:17:59 +02:00
armirveliaj
12b2e659b9 Add unit tests 2024-06-06 13:17:59 +02:00
ionutboangiu
0c87b48c5b Update fsock library version 2024-05-23 10:20:04 +02:00
gezimbll
c41bbcf119 revised janusagent and thresholds it test 2024-05-23 00:15:50 +02:00
armirveliaj
db0e663560 Coverage test for config 2024-05-23 00:13:59 +02:00
gezimbll
01e0b50d3a revise tests for disabling rals on cdrs.processevent 2024-05-18 16:57:45 +02:00
armirveliaj
f2cb8bc07c Add coverage unit test for config pkg 2024-05-18 16:56:47 +02:00
gezimbll
a8b8c84dda updated check on cost details
changed the check of cdr usage to  be less or equal with usage in event cost
2024-05-16 17:40:10 +02:00
armirveliaj
1ef9ea768e Add unit test for orderedmap 2024-05-16 16:28:21 +02:00
armirveliaj
8e23794576 Revise unit tests
prevent panic for xmldp unit test
sort slice before comparing in radiuscfg unit test
2024-05-16 16:28:21 +02:00