Skip to content

Commit

Permalink
Fix tests.
Browse files Browse the repository at this point in the history
Signed-off-by: alex-z <[email protected]>
  • Loading branch information
allexzander committed Dec 6, 2023
1 parent 0d44818 commit 4284bf6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/libsync/clientstatusreportingcommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
*/
#pragma once

#include "owncloudlib.h"

Check failure on line 16 in src/libsync/clientstatusreportingcommon.h

View workflow job for this annotation

GitHub Actions / build

/src/libsync/clientstatusreportingcommon.h:16:10 [clang-diagnostic-error]

'owncloudlib.h' file not found

Check failure on line 16 in src/libsync/clientstatusreportingcommon.h

View workflow job for this annotation

GitHub Actions / build

/src/libsync/clientstatusreportingcommon.h:16:10 [clang-diagnostic-error]

'owncloudlib.h' file not found
#include <QtCore/qobject.h>

namespace OCC {

Check warning on line 19 in src/libsync/clientstatusreportingcommon.h

View workflow job for this annotation

GitHub Actions / build

/src/libsync/clientstatusreportingcommon.h:19:11 [cppcoreguidelines-avoid-non-const-global-variables]

variable 'OCC' is non-const and globally accessible, consider making it const
Expand All @@ -33,5 +34,5 @@ enum ClientStatusReportingStatus {
UploadError_Virus_Detected,
Count,
};
QByteArray clientStatusstatusStringFromNumber(const ClientStatusReportingStatus status);
QByteArray OWNCLOUDSYNC_EXPORT clientStatusstatusStringFromNumber(const ClientStatusReportingStatus status);
}
3 changes: 0 additions & 3 deletions src/libsync/clientstatusreportingnetwork.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion test/testclientstatusreporting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 4284bf6

Please sign in to comment.