fix(unit_tests): skip Configuration.schema_validate_config test if Falco config is not present.

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
This commit is contained in:
Federico Di Pierro
2024-08-21 17:31:32 +02:00
committed by poiana
parent d1c715e7a8
commit 05bbe74d69

View File

@@ -34,6 +34,10 @@ TEST(Configuration, schema_validate_config)
falco_configuration falco_config;
config_loaded_res res;
if (!std::filesystem::exists(TEST_FALCO_CONFIG))
{
GTEST_SKIP() << "Falco config not present under " << TEST_FALCO_CONFIG;
}
EXPECT_NO_THROW(res = falco_config.init_from_file(TEST_FALCO_CONFIG, {}));
EXPECT_VALIDATION_STATUS(res, yaml_helper::validation_ok);
}