Commit Graph

1167 Commits

Author SHA1 Message Date
gezimbll
1765be1247 modified ranking csv and model 2024-10-17 12:17:21 +02:00
ionutboangiu
531affc8ae Update test helpers
- added support for dynamic configuration for dbs
- ConfigJSON field can now be used to partially overwrite an existing
configuration
- extra cgr-engine flags can now be passed to the Run method
- added default db configs for mongo/internal
- implemented helper to load using cgr-loader
2024-10-16 18:43:34 +02:00
ionutboangiu
b05ed15f25 Fix vet check errors and conflicts 2024-10-16 12:24:54 +02:00
ionutboangiu
d4e4facc6b Revise NewRPCClient helper function 2024-10-16 12:24:54 +02:00
ionutboangiu
89dfc3e3d0 Centralize test RPC client constructor
For now, done only for general_tests
2024-10-16 12:24:54 +02:00
ionutboangiu
b7561497c7 Remove global err variable (general_tests)
Prevents compilation errors from tests moved to
flaky that use it.
2024-10-16 12:24:54 +02:00
ionutboangiu
4ec26a4996 Move test cgr-engine helpers to engine package 2024-10-16 12:24:54 +02:00
ionutboangiu
520dca3204 Add tests for load balancing to multiple workers 2024-10-14 16:02:41 +02:00
gezimbll
3dccb44511 added compressing for metrics on trends 2024-10-14 16:01:32 +02:00
gezimbll
69f4f08770 added integration tests for trend event to thresholds,EEs && fixes 2024-10-14 16:01:32 +02:00
ionutboangiu
0a89b131be Add service toggle integration test 2024-10-08 20:53:36 +02:00
ionutboangiu
14e602452c Update rcvr name for TestEngine.Run method 2024-10-08 20:53:36 +02:00
gezimbll
e518e7b913 Integration test for scheduleAutomaticQueries && api for scheduled trends 2024-10-08 20:49:13 +02:00
ionutboangiu
796b508353 Improve dispatcher tests (incomplete) 2024-10-05 20:35:45 +02:00
ionutboangiu
1ab7f80d50 Improve engine setup helpers
- added hook support (executed after parsing config but before starting
  engine)
- made db resets configurable
- merged config parsing helper with the main Setup function
- renamed TestEnvironment.Setup -> TestEngine.Run as it represents the
  setup for a single cgr-engine instance
- removed engineDelay parameter. Added helper to wait up to 200ms for
  the APIerSv1 service to be up and running to prevent 'can't find
  service' errors.
- replaced t.Log with t.Error for engine process kill error
- improved option comments
2024-10-05 20:35:22 +02:00
gezimbll
f0598b050b added unit test for Trend.cleanup && updated TestTrendSchedule 2024-10-02 16:15:27 +02:00
gezimbll
b134df83b7 added it tests and new APIs for TrendS 2024-10-01 20:05:29 +02:00
ionutboangiu
2e97cedc0c Add test for ERs *fileLineNumber *vars field 2024-09-26 17:33:16 +02:00
arberkatellari
3df926c642 Improve V1ReprocessCDRs flags handling 2024-09-24 12:29:41 +02:00
arberkatellari
bd6f5c661d Add *eventTimestamp for EES 2024-09-23 11:52:31 +02:00
arberkatellari
c7e7634189 Add CDRsV1.ReprocessCDRs 2024-09-23 11:52:31 +02:00
ionutboangiu
486fdf54a1 sessions: auth pseudoprepaid ProcessMessage requests
Previously, only *prepaid requests were authorized, for every other
request type, the default usage was used.
2024-09-17 18:16:45 +02:00
arberkatellari
bcb089822f Add APIerSV1TimingIsActiveAt 2024-09-17 18:13:41 +02:00
arberkatellari
f6879d1a24 Revise SetActions APIs 2024-09-16 20:59:38 +02:00
gezimblliku
7131698daf updated processEEs to pass metrics in a map to event 2024-09-10 21:09:57 +02:00
gezimblliku
b56220933a added ees_conns on stats 2024-09-10 13:20:05 +02:00
arberkatellari
932e86aa53 Revise balance blockers 2024-09-09 18:36:31 +02:00
arberkatellari
98f770c61b Adjust balance timing test 2024-09-06 18:29:23 +02:00
arberkatellari
a898e67558 Add active time checker on DebitConnectionFee 2024-09-05 20:48:23 +02:00
ionutboangiu
61711e9573 disable automatic removal of expired balances in test
instead of setting the expiry time sometime in the future and then
waiting for it to expire, now the balances are set directly with
expired balances
2024-09-02 16:18:12 +02:00
ionutboangiu
8fec8dbca1 fix: maintain fallback subj keys configured order 2024-08-30 13:01:01 +02:00
gezimblliku
ac44500fea updated dependencies to last versions 2024-08-21 21:04:36 +02:00
gezimblliku
5b75bacff7 added trend with get,set and remove methods in datamanager 2024-08-14 14:03:21 +02:00
ionutboangiu
78e020e2be Implement HTTP endpoint for prometheus
configurable via 'prometheus_url' option in the HTTP section
2024-08-05 13:28:33 +02:00
arberkatellari
5ccb77c5dc Add mongo support for sessions backup 2024-07-22 15:31:02 +02:00
ionutboangiu
4cba4a699d Implement SharedActionsData for action groups
- holds common relevant data between actions.
- currently supports only *cdrlog, making the process more reliable
and less repetitive. It also provides access to more information about
actions when creating CDRs.
- easier to scale.
- removes the need for cloning accounts before executing a group of
actions.
- added Actions method to check if specific action types exist inside.
2024-07-21 19:04:53 +02:00
arberkatellari
dd5e5b1147 Revise debitCreditBalance 2024-07-14 14:11:16 +02:00
gezimbll
85bd7a50e7 updated sags service name to ranking 2024-07-14 13:39:20 +02:00
gezimbll
4d4392d196 revised comments && renamed sars to trends 2024-07-14 13:39:20 +02:00
gezimbll
6c2fbbec28 added sars model,tp,api 2024-07-14 13:39:20 +02:00
ionutboangiu
eb3bd5cc1d Add redisPoolPipelineLimit configuration field for datadb
Sets the maximum number of commands that can be pipelined before flushing.
0 means no limit and pipelines will only be limited by the time window.
2024-07-05 11:21:16 +02:00
ionutboangiu
520451be7e Add precache support for exporters
Additional changes:
- removed unnecessary locking when initializing the exporter
  cache map, as the service itself is responsible for locking.
- separated setupCache method into ClearExporterCache and
  SetupExporterCache methods.
- removed idle ListenAndServe function that was only waiting for the
  stopChan to close. The reload case was unreachable due to the reload
  channel being created in Start instead of being passed down.
- removed Shutdown method on EventExporterS and replaced it with the
  exported ClearExporterCache method as it provided the same
  functionality.
2024-07-05 11:19:36 +02:00
ionutboangiu
ed3fa0d294 Add redisPoolPipelineWindow configuration field for datadb
Sets the duration after which internal pipelines are flushed.
0 disabled implicit pipelining.
2024-07-02 19:58:03 +02:00
arberkatellari
dddd34f0db Update general test 2024-06-30 17:55:09 +02:00
ionutboangiu
13a0e86a0e Update TestATExportAndTopup integration test
Changed initial *topup action to *topup_reset and increase its weight
to ensure it runs first.
Changed ExpiryTime (inside the *topup_reset action definition) from
*unlimited to +150ms.
Added an extra action trigger to the account to execute ACT_TOPUP_INITIAL
when the balance expires.
Added the following test cases:
  - Execute triggers before balance expiry and verify nothing happens.
  - Wait for the balance to expire (helper now returns balance expiry
  time).
  - Execute triggers again and verify if ACT_TOPUP_INITIAL was executed.
Updated connections from *localhost to *internal.
2024-06-30 17:53:05 +02:00
ionutboangiu
0148e18c05 Update TestATExportAndTopup scenario
Moved to its own file since it has nothing to do with
*transfer_balance anymore.
2024-06-30 17:53:05 +02:00
gezimbll
777d4f0a28 added caching for sagprofile 2024-06-30 17:45:06 +02:00
gezimbll
0012477d52 added stat aggregator profile,models,tps and apis 2024-06-30 17:45:06 +02:00
ionutboangiu
22cbaa58c7 Optimize Kafka SSL integration test
- ERs sometimes took too long to receive a message.
  Setting kafkaGroupID to "" prevents this.
- Kafka reader took 10s to close (default MaxWait).
  Set MaxWait to 1ms.
- Exporters took 1s each to export due to BatchSize
  not being hit. Set BatchSize to 1 to prevent it.
2024-06-30 16:28:52 +02:00
ionutboangiu
36598294a2 Revise Kafka SSL test
- Updated to use the test suite
- Deleted kafka_ssl sample configuration (moved to test file)
- Replaced 'logger' section with 'general' in configuration
- Revised Kafka server SSL setup comment
- Ensured exporters are synchronous to avoid missing errors
- Implemented helper function to create and clean up kafka topics
2024-06-30 16:28:52 +02:00