Commit graph

102 commits

Author SHA1 Message Date
Camila Ayres
92390cc754 Add tests to remove all files when sycing with or without nextcloudcmd.
Signed-off-by: Camila Ayres <hello@camilasan.com>
2024-06-28 18:18:08 +02:00
Matthieu Gallien
098f4ef164 better automated tests log
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-05-15 15:06:11 +02:00
Matthieu Gallien
274d866c19 fix failing automated test that erases invalid iterator
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-04-26 09:05:12 +02:00
Claudio Cambra
3765df627b Fix test compilation
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-04-26 09:05:12 +02:00
alex-z
b52906a8a6 Fix tests failure. Refactoring.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2024-04-23 12:18:12 +02:00
alex-z
9ae60258e1 Unit tests for diverse conflicts in one folder.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2024-04-23 12:18:12 +02:00
Matthieu Gallien
4844f326c1 newly created folders will be read-only when needed
Close #6296

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-03-12 23:30:02 +01:00
Matthieu Gallien
bbc976c920 gather more information on exceptions that happen when running tests
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-03-12 23:30:02 +01:00
Matthieu Gallien
0b869247ef
immediately flush logs in automated test of sync engine
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2023-12-14 14:39:47 +01:00
alex-z
4672acb5a6 Unit tests for the type change.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2023-12-13 11:43:25 +01:00
Dimitri Papadopoulos
8a73a9a6f5 Fix new typos found by codespell
Signed-off-by: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com>
2023-09-17 10:41:38 +02:00
Claudio Cambra
2f5c164534 Enforce Chunk V2 API chunk size limits at the sync options level
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-31 15:25:00 +02:00
Matthieu Gallien
ac3fc531ff
test that discovery of file names with UTF-8 is working
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2023-08-16 10:44:37 +02:00
Claudio Cambra
1cd537f928 Add test for unmodified local files not getting mtimes changed upon upload to server
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-07 16:25:19 +08:00
Claudio Cambra
0b13be663b
Add test for correct reporting of existing folder overcoming size limit
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2023-08-04 17:42:35 +08:00
Matthieu Gallien
505021af03 enable debug log for some automated tests
should help investigate failure for automated tests

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2023-07-12 13:41:53 +02:00
Dimitri Papadopoulos
9d830e94f9 Fix typos found by codespell
Signed-off-by: Dimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com>
2023-06-21 08:47:13 +02:00
alex-z
e6f003b00b Remove stale caseclash conflicts when one of conflicting files has been removed from server
Signed-off-by: alex-z <blackslayer4@gmail.com>
2023-06-15 10:13:22 +02:00
Matthieu Gallien
01ecb639ab use new connect syntax
mainly done using clazy and old-style-connect check

close #5426

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2023-02-28 09:36:27 +01:00
Matthieu Gallien
602b8db5e2
handle case clash conflicts in a similar way to content conflicts
introduce a new type of conflict for case clash filename conflicts

add proper handling including a new utility class to solve them and a
new dialog for the user to pick a fix

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2023-01-25 16:37:35 +01:00
alex-z
089b677633 Fix SyncEngineTest failure when localstate is destroyed.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-12-15 10:32:10 +01:00
Matthieu Gallien
af49e1079a fix test and code to not stop on case clash errors
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-11-30 11:49:35 +01:00
Matthieu Gallien
b68754827c case clash should not prevent full propagation
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-11-30 11:49:35 +01:00
Matthieu Gallien
c379879e30 check that we update local file mtime on changes from server
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-11-22 15:08:46 +01:00
allexzander
5175d186a4 Do not ignore return values for SyncJournalDB in unit tests.
Signed-off-by: allexzander <blackslayer4@gmail.com>
2022-09-17 09:47:15 +02:00
Matthieu Gallien
b5a10d7829 add new tests dedicated for recovery scenario of wrong mtime on server
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-03-17 23:28:02 +00:00
Matthieu Gallien
d4081c99a7 prevent updating files when that would result in invalid mtime
ensure that we never try to sync a file with a sync that would result in
setting it up to an invalid mtime

test a recovery scenario with plain old sync folder and virtual files

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-03-17 23:28:02 +00:00
alex-z
37168fce9f Fix review comments.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-02-25 15:31:26 +00:00
alex-z
1a300d0d56 Unit tests for new files restore logic when the parent folder is removed on the server.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-02-25 15:31:26 +00:00
alex-z
3443de4388 Rollback local move when server move has failed.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-02-23 16:53:26 +02:00
Matthieu Gallien
e4590d7a3b ensure that bulk upload network job errors are handled
in case we get a network error during bulk propagator POST network
request, report all files within this upload as files in error that will
then be sent using the plain old WebDAV protocol

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2022-02-11 09:44:20 +01:00
alex-z
225753a8c0 Refactor DeleteJob and DeleteApiJob to use SimpleFileJob.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-01-11 13:37:09 +00:00
alex-z
190d278fd4 Checksum validation PropagateDownload unit tests.
Signed-off-by: alex-z <blackslayer4@gmail.com>
2022-01-11 13:37:09 +00:00
Matthieu Gallien
c194605c35 implement bulk upload
add PutMultiFileJob to send many files at once

use it in BulkPropagatorJob to implement bulk upload feature

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-11-24 16:17:47 +01:00
Matthieu Gallien
112be18635 read capabilities for bulk upload from server
use it in dedicated tests

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-11-24 16:17:47 +01:00
Matthieu Gallien
c6344c05be add test to check the order of actions when uploading new files
should allow to check that uploads are delayed after directories are
created

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2021-10-26 12:45:15 +02:00
Hannah von Reth
3a87067348 Cleanup 2021-08-23 09:40:26 +02:00
Hannah von Reth
4d615c31da
Rename csync_instructions_e -> SyncInsturctions 2020-12-15 10:59:10 +01:00
Olivier Goffart
390af4d41b
Tests: introduce ItemCompletedSpy to avoid a bit of code duplication 2020-12-15 10:59:00 +01:00
Christian Kamm
89216daee6
Propagate dir: Never write the etag on remote mkdir #7481
It must always only be written once all children are successfully
propagated.
2020-12-15 10:59:00 +01:00
Markus Goetz
26b5e36351
Discovery: List local directories from thread #7456 #7439 2020-12-15 10:58:59 +01:00
Christian Kamm
28797baa39
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
2020-12-15 10:58:58 +01:00
Christian Kamm
cd10e3d28c
PropagateDirectory: Set initial dir mtime to server mtime #7119
It's still not synced in any way later.
2020-12-15 10:58:46 +01:00
Christian Kamm
238ac53666
Ensure local discovery on selective sync changes
As far as I'm aware local discovery can be skipped on folders that are
selective-sync blacklisted, so a local discovery is required when an
entry is removed from the blacklist.

Also rename
avoidReadFromDbOnNextSync() -> schedulePathForRemoteDiscovery()
since the old name might also imply it's not read from db in the local
discovery - which is not the case. Use Folder::
schedulePathForLocalDiscovery() for that.
2020-12-15 10:58:41 +01:00
Christian Kamm
4c04351360
Fix warnings about signedness
Sizes are always qint64, not unsigned.
TransferIds are always uint.
2020-12-15 10:58:41 +01:00
Christian Kamm
60cb5d3b34
Tests: Fix permission propagation check
It was using the wrong path to the conflict file.
2020-12-15 10:58:41 +01:00
Christian Kamm
5089f55629
Test: Add check for permission propagation
Also covering propagation to the downloaded file when a conflict-rename
is done at the same time, which used to not work.
2020-12-15 10:58:41 +01:00
Olivier Goffart
edd806960d
Propagator: Don't abort sync on error 503
Only do it when it is actually a maintenance mode

Issues #5088, #5859, https://github.com/owncloud/enterprise/issues/2637
2020-12-15 10:58:27 +01:00
Christian Kamm
e10e953c66
PropagateUpload: Avoid crash due to cascading aborts
https://sentry.io/owncloud/desktop-win-and-mac/issues/698694072/activity/
2020-12-15 10:58:11 +01:00
Olivier Goffart
640cf0c71e
Fix leaks in tests
As discovered by AddressSanitizer
2020-12-15 10:58:11 +01:00