mirror of
https://github.com/falcosecurity/falco.git
synced 2026-05-08 14:47:58 +00:00
Add a unit test for providing an alternate rules loader that also demonstrates how users can define sub-classes that may want to extend the falco rules syntax. This test creates a test rules reader/collector/compiler that supports top-level objects "test_object". The reader reads them and saves them in the collector. The compiler iterates over all test_objects and puts the property values into a single set<string>. Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
Falco unit tests
Intro
Under unit_tests/engine and unit_tests/falco directories, we have different test suites that could be a single file or an entire directory according to the number and the complexity of tests.
Build and Run
cmake -DMINIMAL_BUILD=On -DBUILD_BPF=Off -DBUILD_DRIVER=Off -DBUILD_FALCO_UNIT_TESTS=On ..
make falco_unit_tests
sudo ./unit_tests/falco_unit_tests