~aleteoryx/muditaos

e1400aee902f44fb81c5a1efb32d9db561a88df2 — Radoslaw Wicik 5 years ago ec56afc
[EGD-5685] Add version field in DeviceInfo EP

Adding field required by Mudita Center in DeviceInfo Endpoint.
Updated harnes test.
M module-services/service-desktop/endpoints/deviceInfo/DeviceInfoEndpoint.cpp => module-services/service-desktop/endpoints/deviceInfo/DeviceInfoEndpoint.cpp +4 -1
@@ 10,6 10,8 @@
#include <source/version.hpp>
#include <time/time_conversion.hpp>
#include <service-desktop/service-desktop/ServiceDesktop.hpp>
#include <version.hpp>

#include <cstdint>
#include <string>



@@ 50,7 52,8 @@ auto DeviceInfoEndpoint::getDeviceInfo(Context &context) -> bool
         {json::gitTag, (std::string)GIT_TAG},
         {json::gitBranch, (std::string)GIT_BRANCH},
         {json::updateHistory, updateHistory},
         {json::currentRTCTime, std::to_string(static_cast<uint32_t>(utils::time::getCurrentTimestamp().getTime()))}}));
         {json::currentRTCTime, std::to_string(static_cast<uint32_t>(utils::time::getCurrentTimestamp().getTime()))},
         {json::version, std::string(VERSION)}}));

    MessageHandler::putToSendQueue(context.createSimpleResponse());
    return true;

M module-services/service-desktop/parser/ParserUtils.hpp => module-services/service-desktop/parser/ParserUtils.hpp +1 -0
@@ 132,6 132,7 @@ namespace parserFSM
        inline constexpr auto statusCode       = "statusCode";
        inline constexpr auto updateHistory    = "updateHistory";
        inline constexpr auto fileExists       = "fileExists";
        inline constexpr auto version          = "version";

        namespace filesystem
        {

M test/pytest/service-desktop/test_device_info.py => test/pytest/service-desktop/test_device_info.py +0 -1
@@ 3,7 3,6 @@
import pytest
from harness.interface.defs import status


@pytest.mark.service_desktop_test
def test_device_info(harness):
    body = {}