Skip to content

Commit

Permalink
fix: AgentTestPath
Browse files Browse the repository at this point in the history
  • Loading branch information
ncvicchi committed Dec 4, 2024
1 parent ab7e267 commit e5eee97
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/agent/tests/agent_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ class AgentTests : public ::testing::Test
std::string AGENT_CONFIG_PATH;
std::string AGENT_DB_PATH;
std::string AGENT_PATH;
std::string TMP_PATH;

void SetUp() override
{
Expand All @@ -30,19 +29,17 @@ class AgentTests : public ::testing::Test
AGENT_CONFIG_PATH = tempFolder + "wazuh-agent.yml";
AGENT_DB_PATH = tempFolder + "agent_info.db";
AGENT_PATH = tempFolder;
TMP_PATH = tempFolder;
#else
AGENT_CONFIG_PATH = "/tmp/wazuh-agent.yml";
AGENT_DB_PATH = "/tmp/agent_info.db";
AGENT_PATH = "/tmp/wazuh-agent";
TMP_PATH = "/tmp";
AGENT_PATH = "/tmp";
#endif

CreateTempConfigFile();

SysInfo sysInfo;
std::unique_ptr<AgentInfo> agent = std::make_unique<AgentInfo>(
TMP_PATH,
AGENT_PATH,
[&sysInfo]() mutable { return sysInfo.os(); },
[&sysInfo]() mutable { return sysInfo.networks(); });

Expand Down

0 comments on commit e5eee97

Please sign in to comment.