From 4284bf61c3e3f79e2afdd691760b3e5448d6fe86 Mon Sep 17 00:00:00 2001 From: alex-z Date: Wed, 6 Dec 2023 19:04:57 +0100 Subject: [PATCH] Fix tests. Signed-off-by: alex-z --- src/libsync/clientstatusreportingcommon.h | 3 ++- src/libsync/clientstatusreportingnetwork.cpp | 3 --- test/testclientstatusreporting.cpp | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/libsync/clientstatusreportingcommon.h b/src/libsync/clientstatusreportingcommon.h index 7b7a2d034b5f3..8ad677b79a620 100644 --- a/src/libsync/clientstatusreportingcommon.h +++ b/src/libsync/clientstatusreportingcommon.h @@ -13,6 +13,7 @@ */ #pragma once +#include "owncloudlib.h" #include namespace OCC { @@ -33,5 +34,5 @@ enum ClientStatusReportingStatus { UploadError_Virus_Detected, Count, }; -QByteArray clientStatusstatusStringFromNumber(const ClientStatusReportingStatus status); +QByteArray OWNCLOUDSYNC_EXPORT clientStatusstatusStringFromNumber(const ClientStatusReportingStatus status); } diff --git a/src/libsync/clientstatusreportingnetwork.cpp b/src/libsync/clientstatusreportingnetwork.cpp index 18e3bcced9e1a..f6ab6ffe38ad5 100644 --- a/src/libsync/clientstatusreportingnetwork.cpp +++ b/src/libsync/clientstatusreportingnetwork.cpp @@ -22,9 +22,6 @@ namespace { -constexpr auto lastSentReportTimestamp = "lastClientStatusReportSentTime"; -constexpr auto statusNamesHash = "statusNamesHash"; - constexpr auto statusReportCategoryE2eErrors = "e2e_errors"; constexpr auto statusReportCategoryProblems = "problems"; constexpr auto statusReportCategorySyncConflicts = "sync_conflicts"; diff --git a/test/testclientstatusreporting.cpp b/test/testclientstatusreporting.cpp index 17daf5c1c2f95..e0f625ae00876 100644 --- a/test/testclientstatusreporting.cpp +++ b/test/testclientstatusreporting.cpp @@ -122,7 +122,7 @@ private slots: const auto problemsReceived = bodyReceivedAndParsed.value("problems").toMap(); QVERIFY(!problemsReceived.isEmpty()); QCOMPARE(problemsReceived.size(), 4); - const auto problemsNoWritePermissions = problemsReceived.value(OCC::ClientStatusReportingNetwork::classifyStatus(OCC::ClientStatusReportingStatus::UploadError_No_Write_Permissions)).toMap(); + const auto problemsNoWritePermissions = problemsReceived.value(OCC::clientStatusstatusStringFromNumber(OCC::ClientStatusReportingStatus::UploadError_No_Write_Permissions)).toMap(); // among those, 3 occurances of UploadError_No_Write_Permissions QCOMPARE(problemsNoWritePermissions.value("count"), 3);