mirror of
https://github.com/falcosecurity/falco.git
synced 2025-09-12 21:16:33 +00:00
fix(test): expect warning instead of error on invalid macro/list name
Signed-off-by: Gianmatteo Palmieri <mail@gian.im>
This commit is contained in:
committed by
poiana
parent
dd59c48034
commit
eb04b1c66f
@@ -473,7 +473,7 @@ void rule_loader::reader::read_item(
|
||||
bool invalid_name = !re2::RE2::FullMatch(name, s_rgx_barestr);
|
||||
if(invalid_name)
|
||||
{
|
||||
cfg.res->add_warning(falco::load_result::LOAD_INVALID_LIST_NAME, "List has an invalid name. List names must match a regular expression: " RGX_BARESTR, ctx);
|
||||
cfg.res->add_warning(falco::load_result::LOAD_INVALID_LIST_NAME, "List has an invalid name. List names should match a regular expression: " RGX_BARESTR, ctx);
|
||||
}
|
||||
|
||||
rule_loader::list_info v(ctx);
|
||||
@@ -520,7 +520,7 @@ void rule_loader::reader::read_item(
|
||||
bool invalid_name = !re2::RE2::FullMatch(name, s_rgx_identifier);
|
||||
if(invalid_name)
|
||||
{
|
||||
cfg.res->add_warning(falco::load_result::LOAD_INVALID_MACRO_NAME, "Macro has an invalid name. Macro names must match a regular expression: " RGX_IDENTIFIER, ctx);
|
||||
cfg.res->add_warning(falco::load_result::LOAD_INVALID_MACRO_NAME, "Macro has an invalid name. Macro names should match a regular expression: " RGX_IDENTIFIER, ctx);
|
||||
}
|
||||
|
||||
rule_loader::macro_info v(ctx);
|
||||
|
Reference in New Issue
Block a user