aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Files
Commit message (Collapse)AuthorAgeFilesLines
* fix(tests): Fix test to remove call to non-existing constructorfix/move-storage-constructor-to-specific-interfaceCôme Chilliet2024-09-231-1/+0
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* chore(deps): Update nextcloud/coding-standard to v1.3.1provokateurin2024-09-196-11/+11
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* test: put parent items into cache in testsRobin Appelman2024-09-184-50/+82
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* test: fix incorrect ltrim usage in testRobin Appelman2024-09-181-2/+2
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix(tests): Fix most obvious errors in ObjectStore testsCôme Chilliet2024-09-173-56/+60
| | | | | | Some are still failing Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix(tests): Fix Folder testsCôme Chilliet2024-09-171-3/+22
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Merge pull request #47986 from cfiehe/fix_move_on_same_bucketStephan Orbaugh2024-09-173-0/+178
|\ | | | | perf(ObjectStoreStorage): Improve (slow) move on same object bucket
| * perf(ObjectStoreStorage): Improve (slow) move on same object bucketChristoph Fiehe2024-09-163-0/+178
| | | | | | | | | | | | | | | | | | This commit fixes the issue #47856. When you upload a file into a group folder and when you use a single S3 bucket as primary storage, the final move operation hangs for a long time. In the background, Nextcloud initiates a copy-delete sequence from the bucket into the bucket, with causes a lot unnecessary overhead. Nextcloud thinks that the file must be imported to another storage and does not recognize that everything is done on the same object bucket. In that case, the import step can be completely skipped, which saves time, network bandwidth and reduces the load on the object storage. The behavior improves a lot with https://github.com/nextcloud/server/pull/46013. However, there are still some put messages that are being sent to the object storage when you use an object storage as primary storage and upload files into a group folder. Co-authored-by: Kate <26026535+provokateurin@users.noreply.github.com> Signed-off-by: Christoph Fiehe <c.fiehe@eurodata.de>
* | fix: Fix other uses of removed Storage interfaceCôme Chilliet2024-09-162-2/+3
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | fix: Remove OCP\Files\Storage interface deprecated since version 9Côme Chilliet2024-09-163-13/+13
|/ | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* refactor: Add void return type to PHPUnit test methodsChristoph Wurst2024-09-1565-546/+546
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* feat(db): switch from settype to castsfeat/switch-from-settype-to-castsAnna Larch2024-09-151-1/+1
| | | | Signed-off-by: Anna Larch <anna@nextcloud.com>
* fix(files): Check if the target path is a descendant of the shared folder pathGit'Fellow2024-09-051-1/+9
| | | | | | | | | | | | | | | | | | Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> fix: tests Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> fix: fix tests Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> fix: add tests Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com> fix: tests
* chore: adjust code to adhere to coding standardAnna Larch2024-09-051-1/+1
| | | | Signed-off-by: Anna Larch <anna@nextcloud.com>
* Merge pull request #47417 from nextcloud/fix/files/create-mountpoint-parentsKate2024-09-041-0/+31
|\
| * fix(files): Create non-existent parents of mountpointsprovokateurin2024-08-221-0/+31
| | | | | | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* | Merge pull request #47546 from nextcloud/fix/files-view-error-messagesAndy Scherzinger2024-08-291-1/+1
|\ \ | | | | | | fix: Adjust filename validation messages
| * | fix: Adjust filename validation messagesFerdinand Thiessen2024-08-271-1/+1
| | | | | | | | | | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* | | fix: Renaming does not need update but delete permissionsFerdinand Thiessen2024-08-281-3/+3
| | | | | | | | | | | | | | | | | | | | | Renaming is basically copy + delete (a move), so no need to update permissions. Especially if the node is in a invalid directory the node should be moveable but not editable. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* | | chore: Apply php:cs recommendationsLouis Chemineau2024-08-281-7/+7
| | | | | | | | | | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* | | feat: implement distributing partitioned queries over multiple shardsRobin Appelman2024-08-281-0/+17
|/ / | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* / style: update codestyle for coding-standard 1.2.3Daniel Kesselberg2024-08-2515-163/+163
|/ | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* ci: Skip flaky test on PHP 8.3Joas Schilling2024-08-211-0/+4
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix: `FilenameValidator::isForbidden` should only check forbidden filesFerdinand Thiessen2024-08-211-17/+7
| | | | | | And not forbidden basenames as this is used for different purposes. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* Merge branch 'master' into jr-readdir-false-falseJohn Molakvoæ2024-08-1674-953/+1672
|\ | | | | Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
| * Merge pull request #46379 from nextcloud/fix/folder-search-ownerFerdinand Thiessen2024-07-301-3/+11
| |\ | | | | | | fix: `OCP\Files\Node\Folder::search` was not setting the owner
| | * fix: `OCP\Files\Node\Folder::search` was not setting the ownerFerdinand Thiessen2024-07-111-3/+11
| | | | | | | | | | | | | | | | | | The owner was not set on the file info causing e.g. webdav searches to never return the known owner. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
| * | fix(db): Promote the use of `getDatabaseProvider` to reduce the impage of ↵Joas Schilling2024-07-191-2/+2
| | | | | | | | | | | | | | | | | | removed upstream platforms Signed-off-by: Joas Schilling <coding@schilljs.com>
| * | fix: make batch propagator work with sharding restrictionsRobin Appelman2024-07-171-1/+1
| | | | | | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * | fix: make usermountcache compatible with shardingRobin Appelman2024-07-171-22/+33
| | | | | | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * | fix(dav): Verify target path in `setName` instead of source pathFerdinand Thiessen2024-07-161-2/+2
| | | | | | | | | | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
| * | refactor: Migrate filename validation logic from `Storage` to ↵Ferdinand Thiessen2024-07-163-99/+107
| | | | | | | | | | | | | | | | | | `FilenameValidator` Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
| * | feat: Add `forbidden_filename_basenames` config optionFerdinand Thiessen2024-07-151-27/+58
| |/ | | | | | | | | | | | | | | This allows to configure forbidden filenames (the full filename like `.htaccess`) and also forbidden basenames like `com0` where `com0`, `com0.txt` and `com0.tar.gz` will match. We need this as only using basenames was too restrictive and will cause problems on some systems when updating. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
| * feat: Add `IFilenameValidator` to have one consistent place for filename ↵Ferdinand Thiessen2024-07-091-0/+188
| | | | | | | | | | | | | | | | validation Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de> Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com> Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
| * chore: Add SPDX headerAndy Scherzinger2024-05-1373-690/+211
| | | | | | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
| * test: add test for jail watcherRobin Appelman2024-04-081-0/+30
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * fix: Apply new coding standard to all filesCôme Chilliet2024-04-023-3/+3
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * Merge pull request #40131 from summersab/refactor/OC-Server-getShareManagerJohn Molakvoæ2024-03-151-1/+2
| |\
| | * Merge branch 'master' into refactor/OC-Server-getShareManagerJohn Molakvoæ2024-03-1531-176/+1083
| | |\ | | | | | | | | Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
| | * | Refactor `OC\Server::getShareManager`Andrew Summers2023-08-291-3/+4
| | | | | | | | | | | | | | | | Signed-off-by: Andrew Summers <18727110+summersab@users.noreply.github.com>
| * | | Refactor `OC\Server::getLockingProvider`Andrew Summers2024-03-151-3/+3
| | |/ | |/| | | | | | | Signed-off-by: Andrew Summers <18727110+summersab@users.noreply.github.com>
| * | refactor(mimeloader): modernize MimeTypeLoaderThomas Citharel2024-03-141-6/+5
| | | | | | | | | | | | Signed-off-by: Thomas Citharel <tcit@tcit.fr>
| * | feat(files): copy live photosMaxence Lange2024-03-081-3/+6
| | | | | | | | | Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
| * | fix: clearify logic around getMountsForFileId filteringRobin Appelman2024-03-061-11/+11
| | | | | | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * | Merge pull request #43471 from nextcloud/cache-path-by-idRobin Appelman2024-03-056-45/+92
| |\ \ | | | | | | | | Cache path by id
| | * | perf: cache path by id to speedup getting nodes by idRobin Appelman2024-03-046-45/+92
| | | | | | | | | | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * | | test: Additional tests for issue #35776Dariusz Olszewski2024-03-041-0/+146
| |/ / | | | | | | | | | Signed-off-by: Dariusz Olszewski <starypatyk@users.noreply.github.com>
| * | fix: Enforce forbidden filename characters on backendFerdinand Thiessen2024-02-281-3/+48
| | | | | | | | | | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
| * | add some comments for the distributive operation and add another testRobin Appelman2024-02-161-0/+27
| | | | | | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * | add extra flatten step to improve "or eq" -> "in" optimizationRobin Appelman2024-02-151-3/+3
| | | | | | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>