Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2018-04-04 17:27:08 +0300
committerOlivier Goffart <olivier@woboq.com>2018-05-15 19:11:01 +0300
commite7e8a62bb755f36a9a9a588f78dd32cb536c5eb3 (patch)
treee9c4173a9ec769275a5a9aab474cb1f3b1b72d15 /test/testblacklist.cpp
parentfb71a907568dee22c4ca4ccdaaafa726bb393ad9 (diff)
Blacklist: remember the X-Request-ID
Issue #6420 Store the X-Request-ID in the SyncFileItem and also in the blacklist. Note that for consistency reason, the X-Request-ID is also in the SyncFileItem if the request succeeds. Currently there is no UI to access it, but it can be queried with sql commands
Diffstat (limited to 'test/testblacklist.cpp')
-rw-r--r--test/testblacklist.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/testblacklist.cpp b/test/testblacklist.cpp
index f571affa4..cad9f35f2 100644
--- a/test/testblacklist.cpp
+++ b/test/testblacklist.cpp
@@ -51,7 +51,9 @@ private slots:
auto &modifier = remote ? fakeFolder.remoteModifier() : fakeFolder.localModifier();
int counter = 0;
- fakeFolder.setServerOverride([&](QNetworkAccessManager::Operation op, const QNetworkRequest &, QIODevice *) -> QNetworkReply * {
+ QByteArray reqId;
+ fakeFolder.setServerOverride([&](QNetworkAccessManager::Operation op, const QNetworkRequest &req, QIODevice *) -> QNetworkReply * {
+ reqId = req.rawHeader("X-Request-ID");
if (!remote && op == QNetworkAccessManager::PutOperation)
++counter;
if (remote && op == QNetworkAccessManager::GetOperation)
@@ -82,6 +84,7 @@ private slots:
QCOMPARE(entry._retryCount, 1);
QCOMPARE(counter, 1);
QVERIFY(entry._ignoreDuration > 0);
+ QCOMPARE(entry._requestId, reqId);
if (remote)
QCOMPARE(journalRecord(fakeFolder, "A")._etag, initialEtag);
@@ -102,6 +105,7 @@ private slots:
QCOMPARE(entry._retryCount, 1);
QCOMPARE(counter, 1);
QVERIFY(entry._ignoreDuration > 0);
+ QCOMPARE(entry._requestId, reqId);
if (remote)
QCOMPARE(journalRecord(fakeFolder, "A")._etag, initialEtag);
@@ -128,6 +132,7 @@ private slots:
QCOMPARE(entry._retryCount, 2);
QCOMPARE(counter, 2);
QVERIFY(entry._ignoreDuration > 0);
+ QCOMPARE(entry._requestId, reqId);
if (remote)
QCOMPARE(journalRecord(fakeFolder, "A")._etag, initialEtag);
@@ -149,6 +154,7 @@ private slots:
QCOMPARE(entry._retryCount, 3);
QCOMPARE(counter, 3);
QVERIFY(entry._ignoreDuration > 0);
+ QCOMPARE(entry._requestId, reqId);
if (remote)
QCOMPARE(journalRecord(fakeFolder, "A")._etag, initialEtag);