From 1e82d32f169cbb07e572fd0be328dd93e0882bfc Mon Sep 17 00:00:00 2001 From: Andy Ford Date: Sun, 14 Apr 2024 20:12:31 +0100 Subject: [PATCH] test: fix test --- test/utils/log/ApiLoggerTest.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/utils/log/ApiLoggerTest.cpp b/test/utils/log/ApiLoggerTest.cpp index 513efe5a..44ec3410 100644 --- a/test/utils/log/ApiLoggerTest.cpp +++ b/test/utils/log/ApiLoggerTest.cpp @@ -14,7 +14,7 @@ namespace UKControllerPluginUtilsTest::Api { TEST_F(ApiLoggerTest, ItLogsSync) { - const nlohmann::json expectedPayload = {{"type", "type"}, {"message", "message"}}; + const nlohmann::json expectedPayload = {{"type", "type"}, {"message", "message"}, {"plugin_version", "#VERSION_STRING#"}}; this->ExpectApiRequest()->Post().To("plugin/logs").WithBody(expectedPayload).WillReturnCreated(); logger.Log("type", "message"); @@ -24,7 +24,7 @@ namespace UKControllerPluginUtilsTest::Api { { const nlohmann::json metadata = {{"key", "value"}}; const nlohmann::json expectedPayload = { - {"type", "type"}, {"message", "message"}, {"metadata", metadata.dump()}}; + {"type", "type"}, {"message", "message"}, {"metadata", metadata.dump()}, {"plugin_version", "#VERSION_STRING#"}}; this->ExpectApiRequest()->Post().To("plugin/logs").WithBody(expectedPayload).WillReturnCreated(); logger.Log("type", "message", metadata); @@ -32,7 +32,7 @@ namespace UKControllerPluginUtilsTest::Api { TEST_F(ApiLoggerTest, ItLogsAsync) { - const nlohmann::json expectedPayload = {{"type", "type"}, {"message", "message"}}; + const nlohmann::json expectedPayload = {{"type", "type"}, {"message", "message"}, {"plugin_version", "#VERSION_STRING#"}}; this->ExpectApiRequest()->Post().To("plugin/logs").WithBody(expectedPayload).WillReturnCreated(); logger.LogAsync("type", "message"); @@ -42,7 +42,7 @@ namespace UKControllerPluginUtilsTest::Api { { const nlohmann::json metadata = {{"key", "value"}}; const nlohmann::json expectedPayload = { - {"type", "type"}, {"message", "message"}, {"metadata", metadata.dump()}}; + {"type", "type"}, {"message", "message"}, {"metadata", metadata.dump()}, {"plugin_version", "#VERSION_STRING#"}}; this->ExpectApiRequest()->Post().To("plugin/logs").WithBody(expectedPayload).WillReturnCreated(); logger.LogAsync("type", "message", metadata);