mirror of
https://github.com/falcosecurity/falco.git
synced 2025-06-27 07:07:23 +00:00
fix(userspace/falco): adapt tests
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
This commit is contained in:
parent
78312c8c15
commit
46f15facfe
@ -23,7 +23,7 @@ set(
|
|||||||
engine/test_filter_evttype_resolver.cpp
|
engine/test_filter_evttype_resolver.cpp
|
||||||
engine/test_filter_warning_resolver.cpp
|
engine/test_filter_warning_resolver.cpp
|
||||||
engine/test_plugin_requirements.cpp
|
engine/test_plugin_requirements.cpp
|
||||||
falco/test_configuration.cpp
|
falco/test_yaml_helper.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
set(FALCO_TESTED_LIBRARIES falco_engine ${YAMLCPP_LIB})
|
set(FALCO_TESTED_LIBRARIES falco_engine ${YAMLCPP_LIB})
|
||||||
|
@ -32,7 +32,7 @@ string sample_yaml =
|
|||||||
|
|
||||||
TEST_CASE("configuration must load YAML data", "[configuration]")
|
TEST_CASE("configuration must load YAML data", "[configuration]")
|
||||||
{
|
{
|
||||||
yaml_configuration conf;
|
yaml_helper conf;
|
||||||
|
|
||||||
SECTION("broken YAML")
|
SECTION("broken YAML")
|
||||||
{
|
{
|
||||||
@ -58,7 +58,7 @@ TEST_CASE("configuration must load YAML data", "[configuration]")
|
|||||||
|
|
||||||
TEST_CASE("configuration must read YAML fields", "[configuration]")
|
TEST_CASE("configuration must read YAML fields", "[configuration]")
|
||||||
{
|
{
|
||||||
yaml_configuration conf;
|
yaml_helper conf;
|
||||||
conf.load_from_string(sample_yaml);
|
conf.load_from_string(sample_yaml);
|
||||||
|
|
||||||
SECTION("base level")
|
SECTION("base level")
|
||||||
@ -96,7 +96,7 @@ TEST_CASE("configuration must read YAML fields", "[configuration]")
|
|||||||
TEST_CASE("configuration must modify YAML fields", "[configuration]")
|
TEST_CASE("configuration must modify YAML fields", "[configuration]")
|
||||||
{
|
{
|
||||||
string key = "base_value.subvalue.subvalue2.boolean";
|
string key = "base_value.subvalue.subvalue2.boolean";
|
||||||
yaml_configuration conf;
|
yaml_helper conf;
|
||||||
conf.load_from_string(sample_yaml);
|
conf.load_from_string(sample_yaml);
|
||||||
REQUIRE(conf.get_scalar<bool>(key, false) == true);
|
REQUIRE(conf.get_scalar<bool>(key, false) == true);
|
||||||
conf.set_scalar<bool>(key, false);
|
conf.set_scalar<bool>(key, false);
|
Loading…
Reference in New Issue
Block a user