mirror of
https://github.com/falcosecurity/falco.git
synced 2025-06-26 14:52:20 +00:00
fix(unit_tests/falco): enable env test on win32
Signed-off-by: Roberto Scolaro <roberto.scolaro21@gmail.com>
This commit is contained in:
parent
0ca5251128
commit
5db29f4692
@ -109,7 +109,7 @@ TEST(Configuration, configuration_environment_variables)
|
||||
std::string env_var_value = "envVarValue";
|
||||
std::string env_var_name = "ENV_VAR";
|
||||
std::string default_value = "default";
|
||||
setenv(env_var_name.c_str(), env_var_value.c_str(), 1);
|
||||
SET_ENV_VAR(env_var_name.c_str(), env_var_value.c_str());
|
||||
yaml_helper conf;
|
||||
|
||||
std::string sample_yaml =
|
||||
@ -172,7 +172,7 @@ TEST(Configuration, configuration_environment_variables)
|
||||
ASSERT_EQ(base_value_2_list_2, "$UNSED_XX_X_X_VAR"); // Does not follow the `${VAR}` format, so should be treated as a regular string
|
||||
|
||||
/* Clear the set environment variable after testing */
|
||||
unsetenv(env_var_name.c_str());
|
||||
SET_ENV_VAR(env_var_name.c_str(), env_var_value.c_str());
|
||||
}
|
||||
|
||||
TEST(Configuration, configuration_webserver_ip)
|
||||
|
Loading…
Reference in New Issue
Block a user