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

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2018-04-04 18:33:14 +0300
committerRoeland Jago Douma <roeland@famdouma.nl>2018-06-06 10:52:02 +0300
commit012c638d4ebb087ab397f7a6b26697e7b87e1a4d (patch)
tree6f0b7b899bcca636f62e8b7ad055ce438c30ef58 /test
parent27e1efb8a3487b98e0d69dff9e76bfad6471e196 (diff)
Uploads: Don't delete unexisting chunks
Since commit 4dc49ff3, we store an entry in the upload info table even for non chunked uploads. However, if this fails we don't want to remove non-existant stale chunks if the upload fails. Without this commit, we would send a DELETE command to clean non-existant chunks in the dav/uploads/ namespace.
Diffstat (limited to 'test')
-rw-r--r--test/testchunkingng.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/testchunkingng.cpp b/test/testchunkingng.cpp
index ce7880537..8b32c13c7 100644
--- a/test/testchunkingng.cpp
+++ b/test/testchunkingng.cpp
@@ -389,6 +389,10 @@ private slots:
int responseDelay = AbstractNetworkJob::httpTimeout * 1000 * 1000; // much bigger than http timeout (so a timeout will occur)
// This will perform the operation on the server, but the reply will not come to the client
fakeFolder.setServerOverride([&](QNetworkAccessManager::Operation op, const QNetworkRequest &request, QIODevice *outgoingData) -> QNetworkReply * {
+ if (!chunking) {
+ Q_ASSERT(!request.url().path().contains("/uploads/")
+ && "Should not touch uploads endpoint when not chunking");
+ }
if (!chunking && op == QNetworkAccessManager::PutOperation) {
checksumHeader = request.rawHeader("OC-Checksum");
return new DelayedReply<FakePutReply>(responseDelay, fakeFolder.remoteModifier(), op, request, outgoingData->readAll(), &fakeFolder.syncEngine());