12 Commits

Author SHA1 Message Date
ionutboangiu
8443af3a89 Relicense from GPLv3 to AGPLv3 2025-10-29 19:42:40 +01: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
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
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
16eb745f00 Centralize test flags in utils for shared use across tests 2024-04-08 13:14:02 +02:00
ionutboangiu
b3d0b8ffbe Revise tests failing due to configuration changes 2024-03-14 17:12:43 +01:00
ionutboangiu
0aea8ac641 Revert "Move CGREvent from utils to engine"
This reverts commit 02195c47ed.
2024-03-04 09:49:15 +01:00
ionutboangiu
02195c47ed Move CGREvent from utils to engine 2024-02-27 17:16:57 +01:00
ionutboangiu
22d7ecf784 Add test for multiple groups pricing +testsuite update 2023-11-14 18:26:05 +01:00
ionutboangiu
ada0d948b6 Implement helper functions for setting up test environment 2023-11-02 19:38:24 +01:00
ionutboangiu
29fccbb6c7 Add test for handling escaped characters via api 2023-10-02 21:04:00 +02:00