diff --git a/src/agent/agent_queue/tests/queue_test.cpp b/src/agent/agent_queue/tests/queue_test.cpp index 364eb15298..04d06e0659 100644 --- a/src/agent/agent_queue/tests/queue_test.cpp +++ b/src/agent/agent_queue/tests/queue_test.cpp @@ -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()); } EXPECT_EQ(0, queue.storedItems(MessageType::STATELESS, "fakemodule")); @@ -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()); + EXPECT_EQ("module-" + std::to_string(val), singleMessage.data.at("module").get()); } auto messageReceivedContent1 = queue.getNextN(MessageType::STATELESS, 10, "module-1"); diff --git a/src/agent/agent_queue/tests/sqlitestorage_test.cpp b/src/agent/agent_queue/tests/sqlitestorage_test.cpp index fdb36e4769..0783e00901 100644 --- a/src/agent/agent_queue/tests/sqlitestorage_test.cpp +++ b/src/agent/agent_queue/tests/sqlitestorage_test.cpp @@ -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()); } }