Mark Stemm
09a9fd4c26
Add tests for mismatched sources and append
...
Add additional unit tests to verify that rule loading fails when a
second rules object has a different source but the name of an existing
rules object.
Also add tests for additional rules having an empty source.
Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
2024-10-24 08:45:12 +02:00
Poiana
50b98b30e5
chore(falco): apply code formatting
...
Signed-off-by: Poiana <poiana.bot@gmail.com>
2024-09-30 13:25:31 +02:00
Federico Di Pierro
5bd2d5a63e
cleanup(userspace,unit_tests): moved rule schema under engine.
...
Also, moved yaml_helper under engine/ folder.
Ported rule json schema validation in the engine.
Also, updated rule_loader tests to check for validation.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2024-09-11 13:20:31 +02:00
Jason Dellaluce
6783cc7055
fix(unit_tests): adapt tests to new engine warning formats
...
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
2024-08-26 15:51:25 +02:00
Jason Dellaluce
64039196ad
chore(unit_tests): fix linting issue
...
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
2024-05-17 14:38:57 +02:00
Jason Dellaluce
ec9f148e0b
test(engine): cover case of replaced or appended exceptions
...
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
2024-05-17 14:38:57 +02:00
Jason Dellaluce
c6e3cfd115
test(engine): cover transformers and field-to-field checks in exceptions
...
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
2024-05-08 20:23:55 +02:00
Gianmatteo Palmieri
eb04b1c66f
fix(test): expect warning instead of error on invalid macro/list name
...
Signed-off-by: Gianmatteo Palmieri <mail@gian.im>
2024-04-17 11:27:52 +02:00
Gianmatteo Palmieri
c3d0579d9b
fix(test): expect warning instead of error in exceptions names test
...
Signed-off-by: Gianmatteo Palmieri <mail@gian.im>
2024-04-11 17:22:28 +02:00
Gianmatteo Palmieri
368463e295
new(tests): add unique exceptions names test
...
Signed-off-by: Gianmatteo Palmieri <mail@gian.im>
2024-04-03 18:23:53 +02:00
Gianmatteo Palmieri
a8018a2894
new(tests): test override/append exception with no values
...
Signed-off-by: Gianmatteo Palmieri <mail@gian.im>
2024-03-27 09:15:13 +01:00
Gianmatteo Palmieri
3d4be156cc
new(tests): add unit test for invalid macro/list name
...
Signed-off-by: Gianmatteo Palmieri <mail@gian.im>
2024-03-08 00:02:01 +01:00
Gianmatteo Palmieri
928cb8bb8e
new(tests): add unit test for exceptions condition
...
Signed-off-by: Gianmatteo Palmieri <mail@gian.im>
2024-02-28 08:28:26 +01:00
Samuel Gaist
e07f056fc5
fix(tests): remove unused variables in rule loader tests
...
Signed-off-by: Samuel Gaist <samuel.gaist@idiap.ch>
2024-02-19 18:01:48 +01:00
Luca Guerra
1afacb45fb
cleanup(tests): extract engine fixture
...
Signed-off-by: Luca Guerra <luca@guerra.sh>
2024-02-15 11:03:30 +01:00
Jason Dellaluce
58f8f14a1b
fix(tests): solve last few compilation issues
...
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
2024-02-06 10:25:53 +01:00
Jason Dellaluce
acba90d97a
test(engine): assess proper list escaping in engine collector
...
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
2024-01-23 11:58:09 +01:00
Andrea Terzolo
64bbffe5ef
fix codespell
...
Signed-off-by: Andrea Terzolo <andreaterzolo3@gmail.com>
2024-01-11 15:37:38 +01:00
Andrea Terzolo
5ee05abc08
cleanup: adopt a new helper method in tests
...
Signed-off-by: Andrea Terzolo <andreaterzolo3@gmail.com>
2024-01-11 15:37:38 +01:00
Andrea Terzolo
c308f5c7e2
cleanup: rename some error messages
...
Signed-off-by: Andrea Terzolo <andreaterzolo3@gmail.com>
2024-01-11 15:37:38 +01:00
Andrea Terzolo
ee78c862ad
tests: add some new tests on override replace
...
Signed-off-by: Andrea Terzolo <andreaterzolo3@gmail.com>
2024-01-11 15:37:38 +01:00
Andrea Terzolo
8ebdbe3e6f
cleanup: use macros for default error messages
...
Signed-off-by: Andrea Terzolo <andreaterzolo3@gmail.com>
2024-01-11 15:37:38 +01:00
Andrea Terzolo
91d1511285
tests: add test on the order for macro and rules
...
Signed-off-by: Andrea Terzolo <andreaterzolo3@gmail.com>
2024-01-11 15:37:38 +01:00
Andrea Terzolo
3f9ede86bb
tests: add some new tests about list order
...
Signed-off-by: Andrea Terzolo <andreaterzolo3@gmail.com>
2024-01-11 15:37:38 +01:00
Andrea Terzolo
56de6e6786
update(rule_loader): remove the warning on the required_engine_version
...
Signed-off-by: Andrea Terzolo <andreaterzolo3@gmail.com>
2024-01-11 15:37:38 +01:00
Andrea Terzolo
5ac005bd4d
update(rule_loader): deprecate all non-SemVer compatible values
...
Signed-off-by: Andrea Terzolo <andreaterzolo3@gmail.com>
2024-01-11 15:37:38 +01:00
Andrea Terzolo
2367d36867
cleanup(tests): use new check_error_message
helper
...
Signed-off-by: Andrea Terzolo <andreaterzolo3@gmail.com>
2024-01-11 15:37:38 +01:00
Andrea Terzolo
95e4c58e7f
update(rule_loader): deprecate enabled
usage
...
Signed-off-by: Andrea Terzolo <andreaterzolo3@gmail.com>
2024-01-11 15:37:38 +01:00
Andrea Terzolo
4aebee684a
update(rule_loader): deprecate append
key and add a warning
...
Signed-off-by: Andrea Terzolo <andreaterzolo3@gmail.com>
2024-01-11 15:37:38 +01:00
Andrea Terzolo
7cac2833b2
cleanup(rule_loader): add a common log message
...
Signed-off-by: Andrea Terzolo <andreaterzolo3@gmail.com>
2024-01-11 15:37:38 +01:00
Luca Guerra
728c8d7d0e
fix(engine): clarify error message for invalid append
...
Signed-off-by: Luca Guerra <luca@guerra.sh>
2023-12-22 21:49:21 +01:00
Luca Guerra
04dd06b2c6
new(tests): add error testing for rule overrides
...
Signed-off-by: Luca Guerra <luca@guerra.sh>
2023-12-22 21:49:21 +01:00
Luca Guerra
bc072502cc
new(engine): add selective overrides
...
Signed-off-by: Luca Guerra <luca@guerra.sh>
2023-12-22 21:49:21 +01:00