fix(userspace/falco): adapt tests

Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
This commit is contained in:
Jason Dellaluce 2023-01-12 12:02:00 +00:00 committed by poiana
parent 78312c8c15
commit 46f15facfe
2 changed files with 4 additions and 4 deletions

View File

@ -23,7 +23,7 @@ set(
engine/test_filter_evttype_resolver.cpp
engine/test_filter_warning_resolver.cpp
engine/test_plugin_requirements.cpp
falco/test_configuration.cpp
falco/test_yaml_helper.cpp
)
set(FALCO_TESTED_LIBRARIES falco_engine ${YAMLCPP_LIB})

View File

@ -32,7 +32,7 @@ string sample_yaml =
TEST_CASE("configuration must load YAML data", "[configuration]")
{
yaml_configuration conf;
yaml_helper conf;
SECTION("broken YAML")
{
@ -58,7 +58,7 @@ TEST_CASE("configuration must load YAML data", "[configuration]")
TEST_CASE("configuration must read YAML fields", "[configuration]")
{
yaml_configuration conf;
yaml_helper conf;
conf.load_from_string(sample_yaml);
SECTION("base level")
@ -96,7 +96,7 @@ TEST_CASE("configuration must read YAML fields", "[configuration]")
TEST_CASE("configuration must modify YAML fields", "[configuration]")
{
string key = "base_value.subvalue.subvalue2.boolean";
yaml_configuration conf;
yaml_helper conf;
conf.load_from_string(sample_yaml);
REQUIRE(conf.get_scalar<bool>(key, false) == true);
conf.set_scalar<bool>(key, false);