mirror of
https://github.com/falcosecurity/falco.git
synced 2025-09-07 17:54:07 +00:00
fix(userspace/engine): solve integration test errors
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
This commit is contained in:
@@ -587,19 +587,22 @@ bool rule_loader::read(const string &content, falco_engine* engine,
|
||||
}
|
||||
for(auto it = doc->begin(); it != doc->end(); it++)
|
||||
{
|
||||
string ctx = yaml_format_object(content, docs, doc, it);
|
||||
YAML::Node item = *it;
|
||||
try
|
||||
if (!it->IsNull())
|
||||
{
|
||||
THROW(!item.IsMap(), "Unexpected element type. "
|
||||
"Each element should be a yaml associative array.");
|
||||
item["context"] = ctx;
|
||||
read_item(engine, item, warnings);
|
||||
}
|
||||
catch(const exception& e)
|
||||
{
|
||||
errors.push_back(ctxerr(ctx, e.what()));
|
||||
return false;
|
||||
string ctx = yaml_format_object(content, docs, doc, it);
|
||||
YAML::Node item = *it;
|
||||
try
|
||||
{
|
||||
THROW(!item.IsMap(), "Unexpected element type. "
|
||||
"Each element should be a yaml associative array.");
|
||||
item["context"] = ctx;
|
||||
read_item(engine, item, warnings);
|
||||
}
|
||||
catch(const exception& e)
|
||||
{
|
||||
errors.push_back(ctxerr(ctx, e.what()));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user