Skip to content

Commit

Permalink
test: add a test to check the delete in the SetGroups method
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicogp committed Oct 16, 2024
1 parent 9ee8ae7 commit 1aafdda
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/agent/agent_info/tests/agent_info_persistance_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,16 @@ TEST_F(AgentInfoPersistanceTest, TestSetGroups)
EXPECT_EQ(persistance->GetGroups(), newGroups);
}

TEST_F(AgentInfoPersistanceTest, TestSetGroupsDelete)
{
const std::vector<std::string> oldGroups = {"group_1", "group_2"};
const std::vector<std::string> newGroups = {"group_3", "group_4"};
persistance->SetGroups(oldGroups);
EXPECT_EQ(persistance->GetGroups(), oldGroups);
persistance->SetGroups(newGroups);
EXPECT_EQ(persistance->GetGroups(), newGroups);
}

TEST_F(AgentInfoPersistanceTest, TestResetToDefault)
{
const std::string newName = "new_name";
Expand Down

0 comments on commit 1aafdda

Please sign in to comment.