Commit Graph

570 Commits

Author SHA1 Message Date
Hannah von Reth
32d5e08f2a Disable cmocka tests on Windows 2020-04-16 16:20:27 +02:00
Hannah von Reth
73bc702249 Tests: Fix rare crash in OAuthTest
Fixes: #7793
2020-04-16 13:36:55 +02:00
Hannah von Reth
7964e47a28 Test: Disable parallelism to ensure serial execution 2020-04-01 13:47:31 +02:00
Olivier Goffart
242e4e1d70 SocketAPI: fix status after a failure to move
Issue #7759
2020-03-26 09:10:34 +01:00
Hannah von Reth
6a42468513 Test: Fix testMovedWithError for vfs mode 2020-03-26 08:25:45 +01:00
Hannah von Reth
a359baec43 Sync: Fix handling of virtual files in error state
Issue: #7799
2020-03-25 11:40:43 +01:00
Hannah von Reth
3504ae8fc5 Test: Add test for vfs failed move crash 2020-03-25 11:40:43 +01:00
Olivier Goffart
a6f1a976a6 fixup test 2020-02-10 15:15:15 +01:00
Olivier Goffart
aaa51e203d Tests: add a couple of move tests
This was an attempt to reproduce #7722, but this actually does not
reproduce it
2020-02-10 15:15:15 +01:00
Hannah von Reth
120c696edb Fix saving of cookies
Fixes: #7700
2020-02-03 15:55:48 +01:00
Olivier Goffart
ba99c38d19 Don't show the "All files deleted" popup when unselecting everything with selective sync
Issue #7337
2019-11-18 11:28:47 +01:00
Olivier Goffart
48d3c8432e VFS: Do not overwrite existing files by placeholder
For issue #7557 and #7556

Note: this change the API of the VFS plugin, so the VFS plugin needs small
adaptations
2019-11-03 17:01:48 +01:00
Olivier Goffart
60d28c44be Test: Fix testsyncvirtualfiles test
Like previous commit, the failure was caused by two conflicting commits
2019-10-30 18:26:16 +01:00
Olivier Goffart
79e9168beb Fix build of tests.
Resulted from a conflict between two patches
2019-10-30 17:51:28 +01:00
Christian Kamm
16a8823e11 Vfs: Lots of tests and corrections for suffix edge cases
Avoid or deal with problems that happen when suffixed files exist on the
server or suffix and non-suffixed files exist locally.

See #7350, #7261.
2019-10-30 14:41:01 +01:00
Olivier Goffart
fb84e4c990 When moving is allowed but deleting is not, do not restore moved items
Issue #7293
2019-10-11 13:09:07 +02:00
Olivier Goffart
06e3a98e8d Fix Upload of large (> 2GiB) files
Issue #7506

This is a regression introduced by the delta sync feature (as the chunk offset
changed from being the chunk number to be the byte offset, it needs to be a
qint64 now)
2019-10-09 13:55:06 +02:00
Christian Kamm
ed7ec006f0 Tests: Fail if the initial sync fails 2019-10-08 09:37:29 +02:00
Olivier Goffart
1597b2edc1 Tests: introduce ItemCompletedSpy to avoid a bit of code duplication 2019-10-07 22:36:55 +02:00
Christian Kamm
5f3682a47d Propagate dir: Never write the etag on remote mkdir #7481
It must always only be written once all children are successfully
propagated.
2019-10-07 14:33:15 +02:00
Christian Kamm
976db2ef84 Test: Disable local discovery parallelism in permission test
Adding parallelism broke the test because it depended on the order of
discovery.
2019-09-16 19:52:19 +02:00
Markus Goetz
e1b31d742c Discovery: List local directories from thread #7456 #7439 2019-09-09 20:41:55 +02:00
Christian Kamm
99fd45051a Discovery: If a move is forbidden, restore the source
Previously the source was deleted (or attempted to be deleted), even if
the new location was not acceptable for upload. This could make data
unavilable on the server.

For #7410
2019-09-02 09:58:59 +02:00
Christian Kamm
1e652e12b5 Propagation: Fix delete-before-rename bug #7441
By introducing a PropagateRootDirectory job that explicitly
separates the directory deletion jobs from all the other jobs.

Note that this means that if there are errors in subJobs the
dirDeletionJobs won't get executed.
2019-08-30 18:33:23 +02:00
Christian Kamm
0f606229f2 Checksums: Fix crash due to threading issue
The checksum computation thread was potentially using a QFile that was
deleted in the gui thread.

For #7368
2019-08-07 21:22:48 +02:00
Christian Kamm
4fd9bdc4b4 Vfs: Remove old db record when dehydrating via rename
For #7338
2019-07-25 15:21:54 +02:00
Christian Kamm
d09c4fd2e8 Vfs: Ensure pins change with (de-)hydration
Previously an implicit hydration of a file in an online-only folder
would not change the pin state and cause a dehydration on the next
sync.
2019-07-24 16:16:39 +02:00
Christian Kamm
199163187a Vfs: Preserve pin state on hydration
For #7322 and #7323
2019-07-18 20:00:28 +02:00
Christian Kamm
aafa903a02 Drone: Skip DatabaseErrorTest
It seems reliable when run manually, but frequently breaks when executed
by drone.
2019-07-15 11:37:59 +02:00
Christian Kamm
75ddb8dd80 Vfs: Make test pass with different suffix #7279 2019-06-28 10:48:18 +02:00
Christian Kamm
6b89747a26 VfsSuffix: Wipe stale pin states #7273
Previously the pin states of deleted files stayed in the 'flags'
database and could be inadvertently reused when a new file with the same
name appeared. Now they are deleted.

To make this work right, the meaning of the 'path' column in the 'flags'
table was changed: Previously it never had the .owncloud file suffix.
Now it's the same as in metadata.path.

This takes the safe parts from #7274 for inclusion in 2.6. The more
elaborate database schema changes (why use 'path' the join the two
tables in the first place?) shall go into master.
2019-06-27 15:57:20 +02:00
Christian Kamm
86b15ffb20 RequestEtagJob: Consistently parse etags #7271
Previously RequestEtagJob did return the etag verbatim (including extra
quotes) while the db had the parsed form. That caused the etag
comparison during discovery move detection to always fail. The test
didn't catch it because the etags there didn't have quotes.

Now:
- RequestEtagJob will parse the etag, leading to a consistent format
- Tests have etags with quotes, detecting the problem
2019-06-27 13:08:18 +02:00
Christian Kamm
02a9b16b0f Vfs: Move pin state if files move #7250
Previously renames of items didn't carry the pin state with them.
2019-06-23 10:23:37 +02:00
Christian Kamm
e653924e06 Vfs: Don't let new local files start out unpinned #7250
If one adds a new file to an online-only folder the previous behavior
was to upload the file in one sync and dehydrate it in the next. Now
these new files get set to Unspecified pin state, making them retain
their data.
2019-06-23 10:23:37 +02:00
Christian Kamm
86d36f0a78 Merge remote-tracking branch 'origin/2.5' into 2.6 2019-06-12 13:23:41 +02:00
Christian Kamm
98ba64e60c Http2: Resend requests on ContentReSend error #7174
Since Qt does not yet transparently resend HTTP2 requests in some cases
we do it manually.

The test showed a problem where the initial non-200 reply would close
the target temporary file and the follow-up request couldn't store any
data. Removing that close() call is safe because there also is a
_saveBodyToFile flag that guards writes to the target file.

(cherry picked from commit 677e44dc53)

Cherry-picked to allow 2.5 users with new enough Qt to test the HTTP2
workaround.
2019-06-12 13:16:32 +02:00
Christian Kamm
677e44dc53 Http2: Resend requests on ContentReSend error #7174
Since Qt does not yet transparently resend HTTP2 requests in some cases
we do it manually.

The test showed a problem where the initial non-200 reply would close
the target temporary file and the follow-up request couldn't store any
data. Removing that close() call is safe because there also is a
_saveBodyToFile flag that guards writes to the target file.
2019-06-07 19:26:19 +02:00
Christian Kamm
962fafaf9e Tests: Fix DB locking issue in permissions test
(cherry picked from commit 3fb4a540da)
2019-06-07 09:30:52 +02:00
Olivier Goffart
cb26f516f7 Discovery: Do not abort the sync in case of error 404 (or 500)
Issue: #7199
2019-06-05 11:09:16 +02:00
Olivier Goffart
819175ad89 SyncEngine: Fix renaming a single file cause the "delete all file" popup
Possibly a regression, since the new discovery discovers rist the renamed
files as removed

Issue #7204
2019-06-04 15:56:35 +02:00
Markus Goetz
dc2a37e813 OAuth2: Better error logging
This does not fix a bug, just was found while spotting a bug that was no bug.
For https://github.com/owncloud/enterprise/issues/2951
2019-05-15 09:58:59 +02:00
Christian Kamm
87cd1c38be Merge remote-tracking branch 'origin/2.5' into 2.6 2019-05-13 07:51:54 +02:00
Christian Kamm
87a6e039a7 Chunked upload: Fix percent encoding in If header #7176 2019-05-07 10:09:18 +02:00
Christian Kamm
3fb4a540da Tests: Fix DB locking issue in permissions test 2019-05-07 08:25:49 +02:00
Christian Kamm
9b01dbae4c Tests: fix vfs availability test case 2019-05-07 08:21:46 +02:00
Christian Kamm
b0886cd9b1 Fix compile for Debian 8 2019-04-29 12:52:07 +02:00
Christian Kamm
96831247e2 Vfs: "free space" only shows when it has an effect #7143
To do this, introduce AllDehydrated availability and rename
SomeDehydrated to Mixed - it now guarantees there are also hydrated
items.
2019-04-23 09:21:17 +02:00
Christian Kamm
1e1340b457 Merge remote-tracking branch 'origin/2.5' into 2.6 2019-04-17 13:43:53 +02:00
Christian Kamm
6a7b138aa6 Discovery: Query data-fingerprint on root item
Previously the property wasn't queried, meaning the fingerprint logic
couldn't get triggered.
2019-04-12 12:18:02 +02:00
Christian Kamm
440c06c54a Discovery: 403 and 503 on root cause error
Previously these result codes during remote discovery of the sync root
would not cause an error and the discovery would get stuck.

Also extends RemoteDiscovery tests to check for errors on the root item.
2019-04-11 13:48:56 +02:00