Matthieu Gallien
a758ab3957
remove the enforcement of identical etag for a server side item MOVE
...
orignally added by https://github.com/owncloud/client/pull/6632
most probably a too strong assumption on the behavior of the Nextcloud
server
better check real item metadata like fileid, size or modification time
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-10-17 11:22:48 +02:00
Matthieu Gallien
486750670e
handle NEW/NEW conflicts by being real conflicts
...
NEW/NEW conflicts could sometime be ignored and replaced by update
metadata instructions
we stop doing this and handle them like any other conflicts
that would cause more download from the server
those conflicts would be solved automatically in case this is not a real
conflict but the client was missing the server reply with the updated
metadata
will enable more changes to improve MOVE detection from server side
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-10-17 11:22:48 +02:00
Matthieu Gallien
7a2443bf91
in automated tests, update modtime when modifying the content of a file
...
why one would not update the modification time when modifying a remote
file during automated tests
there is no reason to not update the modification time as this is what
is done by the server
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-10-17 11:22:48 +02:00
Matthieu Gallien
8728b4f61c
test syncing of read-only .lnk windows shorcuts
...
related to https://github.com/nextcloud/desktop/pull/7282
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-10-17 11:21:38 +02:00
Camila Ayres
48dcda9008
Add test testFolderMetadataWithEmptySignatureDecryptFails.
...
Signed-off-by: Camila Ayres <hello@camilasan.com>
2024-10-17 11:21:04 +02:00
Camila Ayres
f5f971d2b8
Use preprocessor directives in tests.
...
Signed-off-by: Camila Ayres <hello@camilasan.com>
2024-09-27 07:26:21 +00:00
Camila Ayres
75896f5bb8
Fix tests for trailing spaces on Linux.
...
Signed-off-by: Camila Ayres <hello@camilasan.com>
2024-09-27 07:26:21 +00:00
Camila Ayres
cfb39b7034
Add test testCreateLocalPathsWithLeadingAndTrailingSpaces_syncOnSupportingOs.
...
- Fix discovery tests for files with invalid names.
- Now leading/trailing spaces trigger an error only on Windows.
Signed-off-by: Camila Ayres <hello@camilasan.com>
2024-09-27 07:26:21 +00:00
Matthieu Gallien
14aef728b4
disable our code for network timeout
...
seems we have an issue with Windows and QTimer instances used to detect
network timeout
workaround, find cause of https://github.com/nextcloud/desktop/issues/7184
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-09-26 14:14:53 +00:00
Matthieu Gallien
831f3430ab
add automated tests for complex move scenario
...
we rename the top folder and we rename a not direct child that is also
moved to another folder below the original renamed top folder
so
a/b/c
a/b/d/file
will be
e/b/c/f/file
with
a -> e
d-> f
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-09-12 10:15:16 +02:00
Matthieu Gallien
5b8144f806
detect remnants read-only folders to delete: try to delete them
...
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-09-12 09:57:40 +02:00
Matthieu Gallien
297cdec73a
do not ignore paths containing 2 "#" characters
...
those path may be in use on Windows and are legitimate
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-09-09 09:19:14 +00:00
Matthieu Gallien
abde33e7e5
add automated test for deletion of child items in read-only folders
...
should ensure we are able to get files or dolders be deleted by sync
engine within read-only folders
would happen as the result of changes on server side being propagated
locally or when using selective sync
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-08-21 14:38:21 +02:00
Claudio Cambra
eee3a090cc
Provide Windows-compatible forbidden filename character in forbidden filenames test
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-08-21 09:51:39 +02:00
Claudio Cambra
071ab937af
Add test for new forbidden filename capabilities
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-08-21 09:51:39 +02:00
alex-z
7501a03db6
Unit tests. Test .lnk file with a real shortcut file. Test will hang if QFileInfo is used on .lnk files.
...
Signed-off-by: alex-z <blackslayer4@gmail.com>
2024-07-10 10:29:35 +02:00
alex-z
f70d1c1079
Support Windows .lnk files with VFS Cf API.
...
Signed-off-by: alex-z <blackslayer4@gmail.com>
2024-07-10 10:29:21 +02:00
Camila Ayres
0160cec256
Fix renaming tests for files under group folders.
...
Signed-off-by: Camila Ayres <hello@camilasan.com>
2024-07-05 12:58:38 +02:00
Camila Ayres
4afc033ee0
Add test to detect file renames in external storage.
...
Signed-off-by: Camila Ayres <hello@camilasan.com>
2024-07-05 12:56:52 +02:00
Camila Ayres
ee3f2dd1f6
Extend capabilities test to include desktopEnterpriseChannel check.
...
Signed-off-by: Camila Ayres <hello@camilasan.com>
2024-07-04 10:16:40 +02:00
Camila Ayres
e4b70c4037
Extend Capabilities tests.
...
Signed-off-by: Camila Ayres <hello@camilasan.com>
2024-07-04 10:16:39 +02:00
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
Claudio Cambra
2915e2517e
Properly reset fakefolder test state post-placeholder file delete in testsyncvirtualfiles
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-06-28 18:17:19 +02:00
Claudio Cambra
1382f924c7
Amend behaviour of suffix virtual files test to reflect new expected behaviour
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-06-28 18:17:19 +02:00
Matthieu Gallien
54ffce52cd
automated test: allow rename of the child items of a mount point
...
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-06-25 14:23:43 +02:00
Matthieu Gallien
d6a143808d
automated test: block rename of the top folder of a mount point
...
encode current behavior in a new automated test
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-06-25 14:23:43 +02:00
Matthieu Gallien
9ed87bf2ad
some files just cannot sync on windows: get automated tests to work
...
fix one automated test knowing the platform limitations of windows
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-05-15 17:48:58 +02:00
Matthieu Gallien
3626e4c0c0
skip tests currently broken on macOS: enable mandatory tests for macOS
...
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-05-15 17:05:46 +02:00
Matthieu Gallien
a3083f8be4
skip FolderWatcher on windows: really not a reliable test
...
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-05-15 15:06:11 +02:00
Matthieu Gallien
e2ed718030
disable some unreliable tests for CfApi CI
...
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-05-15 15:06:11 +02:00
Matthieu Gallien
7c9f652c3e
fix regression with VFS update metadata instruction
...
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-05-15 15:06:11 +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
7cde0b16e1
catch std::filesystem exceptions in automated tests
...
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-05-15 15:06:10 +02:00
Matthieu Gallien
96d1fc0720
temporarily ignore failed tests on windows
...
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-05-15 15:06:10 +02:00
Matthieu Gallien
82a0c1d054
NetrcParser tests are known to be broken
...
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-04-26 09:05:12 +02:00
Matthieu Gallien
09e60744c2
e proper data type in data for activity model automated test data
...
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-04-26 09:05:12 +02:00
Matthieu Gallien
670b2ce42f
fix automated tests missing toString() convert from QVariant
...
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-04-26 09:05:12 +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
Matthieu Gallien
ced85ac287
fix automated tests with network requests
...
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
Claudio Cambra
6a497cf21c
Fix QTextCodec related build issues
...
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
2024-04-26 09:05:12 +02:00
Matthieu Gallien
4566400ee6
streamline find_package calls to really find Qt6
...
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-04-26 09:05:12 +02:00
Matthieu Gallien
aa76de9b68
allow detection of qt5 or qt6
...
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
2024-04-26 09:05:12 +02:00
Matthieu Gallien
1f0279e1c1
remove usage of QStringRef due to it being missing in Qt6
...
Signed-off-by: Matthieu Gallien <matthieu.gallien@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
f490989a1a
Fix CI errors.
...
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
Thomas Witt
a5a31321f8
UserStatusDialog.cpp: Fix timezone
...
This test fails on the day before a timezone switch:
Actual (model.clearAtDisplayString()): "23 hours"
Expected (tr("1 day")) : "1 day"
Setting the timezone to UTC remedies this problem.
Signed-off-by: Thomas Witt <pyromaniac@exherbo.org>
2024-04-22 09:47:49 +02:00
Thomas Witt
d0097ce25c
SyncConfilctsModel test: use FakeAccountState
...
Using the real account state needs an internet connection.
Additionally, `example.de` is a valid existing domain, which should
probably not be used in testing. Switching to `example.com` as this is
recommended here.
Signed-off-by: Thomas Witt <pyromaniac@exherbo.org>
2024-04-22 09:47:49 +02:00
Thomas Witt
8a9de185a9
pushnotification testutils: Bind only to LocalHost
...
LocalHost is enough to complete the tests, and it enables the test to be
run under networksandboxing.
Signed-off-by: Thomas Witt <pyromaniac@exherbo.org>
2024-04-22 09:47:49 +02:00