Skip to content

Commit

Permalink
fix: compilation errors fixed in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jr0me committed Aug 14, 2024
1 parent a65a0e8 commit 44243ac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/agent/agent_queue/tests/queue_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ TEST_F(QueueTest, PushMultipleGetMultipleWithModule)
int i = 0;
for (auto singleMessage : messagesReceived)
{
EXPECT_EQ("content " + std::to_string(++i), singleMessage.data.at("data"));
EXPECT_EQ("content " + std::to_string(++i), singleMessage.data.at("data").get<std::string>());
}

EXPECT_EQ(0, queue.storedItems(MessageType::STATELESS, "fakemodule"));
Expand All @@ -471,8 +471,8 @@ TEST_F(QueueTest, PushSinglesleGetMultipleWithModule)
for (auto singleMessage : messagesReceived)
{
auto val = ++i;
EXPECT_EQ("content-" + std::to_string(val), singleMessage.data.at("data"));
EXPECT_EQ("module-" + std::to_string(val), singleMessage.data.at("module"));
EXPECT_EQ("content-" + std::to_string(val), singleMessage.data.at("data").get<std::string>());
EXPECT_EQ("module-" + std::to_string(val), singleMessage.data.at("module").get<std::string>());
}

auto messageReceivedContent1 = queue.getNextN(MessageType::STATELESS, 10, "module-1");
Expand Down
2 changes: 1 addition & 1 deletion src/agent/agent_queue/tests/sqlitestorage_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ TEST_F(SQLiteStorageTest, RetrieveMultipleMessagesWithModule)
int i = 0;
for (auto singleMessage : retrievedMessages)
{
EXPECT_EQ("value" + std::to_string(++i), singleMessage.at("data").at("key"));
EXPECT_EQ("value" + std::to_string(++i), singleMessage.at("data").at("key").get<std::string>());
}
}

Expand Down

0 comments on commit 44243ac

Please sign in to comment.