aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Files
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #52242 from nextcloud/artonge/fix/copy_subfolders_s3Louis5 days1-0/+13
|\
| * test: add test that object store folder copy preserves folder sizeartonge/fix/copy_subfolders_s3Robin Appelman10 days1-0/+13
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Merge pull request #52816 from nextcloud/primary-object-store-settingsRobin Appelman10 days2-110/+139
|\ \ | | | | | | feat: move primary object store configuration to a single place
| * | feat: move primary object store configuration to a single placeprimary-object-store-settingsRobin Appelman10 days2-110/+139
| |/ | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* / test: adjust library tests for PHPunit deprecationsFerdinand Thiessen10 days1-1/+1
|/ | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* chore: Remove useless legacy autoloader for testsfix/cleanup-test-legacy-autoloaderCôme Chilliet11 days1-2/+0
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* feat(UserMountCache): Emit events for added, removed and updated mountsfeat/mountmanager/emit-eventsprovokateurin2025-05-191-17/+68
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* Merge pull request #52848 from nextcloud/fix/cleanup-servercontainerKate2025-05-195-6/+6
|\
| * fix: Remove calls to legacy callers in testsfix/cleanup-servercontainerCôme Chilliet2025-05-162-2/+2
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * fix(tests): Remove calls to removed getMountProviderCollection from testsCôme Chilliet2025-05-163-4/+4
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | test: replace `OC_Helper:rmdirr` with `OCP\Files::rmdirr`chore/remove-deprecated-oc-helperFerdinand Thiessen2025-05-166-6/+13
|/ | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* test: Fix coding standardsci/noid/update-phpunit10Joas Schilling2025-05-153-4/+4
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* test: Fix non-static data providersJoas Schilling2025-05-154-16/+13
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* test: Fix tests/lib/FilesJoas Schilling2025-05-158-63/+64
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* test: Cleanup tests/lib/Files/*Joas Schilling2025-05-1517-89/+99
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Merge pull request #48560 from nextcloud/fix/migrate-encryption-away-from-hooksCôme Chilliet2025-05-142-19/+20
|\ | | | | feat(encryption): Migrate from hooks to events
| * fix(encryption): Improve Update class and event listeneningCôme Chilliet2025-05-131-15/+0
| | | | | | | | | | | | to avoid back&forth between path and Node object Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * fix(tests): Disable encryption wrapper when it makes senseCôme Chilliet2025-05-131-0/+14
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * fix(tests): Remove Encryption disabling in ViewTest to avoid side effectsCôme Chilliet2025-05-131-10/+6
| | | | | | | | | | | | Adapt tests a bit to make them pass with Encryption wrapper registered Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * fix(tests): Unregister encryption modules in ViewTest to avoid side effectsCôme Chilliet2025-05-131-0/+6
| | | | | | | | | | | | It was clearing the hooks with the same results before Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* | Merge pull request #52775 from nextcloud/nested-jail-rootAndy Scherzinger2025-05-141-0/+11
|\ \ | |/ |/| fix unjailedroot of nested jails if there are other wrappers in between
| * test: add test for nested cache jail unjailedrootRobin Appelman2025-05-131-0/+11
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | feat(FilenameValidator): allow to sanitize filenamesfeat/ocp-sanitize-filenamesFerdinand Thiessen2025-05-131-0/+134
|/ | | | | | Share the filename sanitizing with the OCP filename validator. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* test: Finish migrating tests/Core/ to PHPUnit 10 compatible codetest/noid/more-phpunit-10Joas Schilling2025-05-024-86/+98
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Merge pull request #51020 from nextcloud/artonge/fix/transfer_ownershipLouis2025-04-141-0/+18
|\
| * fix: Transfer ownership with S3 as primaryartonge/fix/transfer_ownershipLouis Chemineau2025-04-011-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using S3 as primary storage, transferring ownership with the `--move` option fail with the following error: `SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '8-45b963397aa40d4a0063e0d85e4fe7a1' for key 'fs_storage_path_hash'` The `--move` option moves the entire home folder from one account to another. The error means that the move failed because the destination folder already exist in `oc_filecache`. - With S3 as primary storage, folders only exists as entries in `oc_filecache`. - With S3 as primary storage, `moveFromStorage(...)` only moves the cache entry, as nothing needs to be moved on disk. This cache move does not delete potentially pre-existing destination folder. - With Local storage, `moveFromStorage(...)` calls `rename(...)` which delete pre-existing folder. - `transfer(...)`: https://github.com/nextcloud/server/blob/687a4d9ac7fcdbd935f81a0def567a1092306f7a/apps/files/lib/Service/OwnershipTransferService.php#L112 - `oneTimeUserSetup(...)`: https://github.com/nextcloud/server/blob/687a4d9ac7fcdbd935f81a0def567a1092306f7a/lib/private/Files/SetupManager.php#L261-L262 - `mkdir(...)`: https://github.com/nextcloud/server/blob/687a4d9ac7fcdbd935f81a0def567a1092306f7a/lib/private/Files/ObjectStore/ObjectStoreStorage.php#L91-L135 - `moveFromStorage(...)`: https://github.com/nextcloud/server/blob/687a4d9ac7fcdbd935f81a0def567a1092306f7a/lib/private/Files/ObjectStore/ObjectStoreStorage.php#L635-L636 Delete pre-existing folder in `moveFromStorage(...)` Signed-off-by: Louis Chemineau <louis@chmn.me>
* | fix: Replace all usages of OC_User backend method calls by IUserManagerfix/cleanup-user-backendsCôme Chilliet2025-04-103-4/+9
|/ | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix(IFilenameValidator): correctly handle case insensitivityfix/file-name-validator-case-sensitivityFerdinand Thiessen2025-03-211-1/+91
| | | | | | | | - forbidden names and forbidden base names are case **insensitive** so we need to check all lowercase here. - add test that config value is also read case insensitive. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* fix: make sure we process mime extensions as stringskjnldsv2025-02-051-0/+35
| | | | Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
* fix: Harden files scanner for invalid null accessFerdinand Thiessen2025-01-282-5/+10
| | | | | | Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de> Co-authored-by: Kate <26026535+provokateurin@users.noreply.github.com> Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* fix: Metadata field searchartonge/fix/metadata_field_searchLouis Chemineau2025-01-201-2/+7
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* test: update test for mountpoint numeric storage idmountpoint-get-numeric-storage-id-cacheRobin Appelman2025-01-131-0/+2
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix: improve checks for moving shares/storages into other mountsRobin Appelman2025-01-031-9/+42
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix: fix mimetype not being updated when changing file extention on object storeupdater-change-mimetype-objectstoreRobin Appelman2024-12-051-0/+35
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* test(View): Copy preserves contentLouis Chemineau2024-12-031-0/+8
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* fix(files): Correctly copy the cache information on copy operationsLouis Chemineau2024-12-031-0/+1
| | | | | | Needed to copy the `encrypted` flag of encrypted files when those files are two level down in a moved folder. Signed-off-by: Louis Chemineau <louis@chmn.me>
* fix: Wrap partial cache entry in CacheEntryartonge/fix/getting_cache_entryLouis Chemineau2024-11-211-3/+4
| | | | | | | | Because it is returned here: https://github.com/nextcloud/server/blob/7b7d07c5750583ab3a7b29112af475f5c8891143/lib/private/Files/Cache/Cache.php#L136-L137 And some implementation got stricter: https://github.com/nextcloud/groupfolders/blob/df95bf6ba807da5171de91108879b6d8aa9f3611/lib/Mount/RootEntryCache.php#L23-L28 Signed-off-by: Louis Chemineau <louis@chmn.me>
* Merge pull request #47847 from ↵John Molakvoæ2024-10-291-0/+23
|\ | | | | | | nextcloud/fix-copying-or-moving-from-shared-groupfolders
| * test: add test for nested jail cross-storage movefix-copying-or-moving-from-shared-groupfoldersRobin Appelman2024-10-101-0/+23
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | refactor(Storage): Align all Storage constructorsrefactor/storage/constructorsprovokateurin2024-10-232-5/+5
|/ | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* refactor(Storage): Make all parameter types strong typesprovokateurin2024-10-073-14/+12
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* refactor(Wrapper\Encryption): Migrate to strong typesrefactor/stream-encryption/typingsprovokateurin2024-10-071-109/+119
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* refactor(Stream\Encryption): Migrate to strong typesprovokateurin2024-10-071-26/+38
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* test: Fix IStorage return typesprovokateurin2024-09-264-10/+44
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* fix(tests): Pause trashbin for lock tests in ViewTest using rmdir and unlinkcleanup/event/trashbinCôme Chilliet2024-09-241-1/+16
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Merge pull request #48111 from ↵Côme Chilliet2024-09-231-1/+0
|\ | | | | | | | | nextcloud/fix/move-storage-constructor-to-specific-interface fix: Move storage constructor to specific interface
| * 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>
* | fix(users): Don't crash if disabled user is missing in the databaseartonge/fix/prevent_missing_users_from_crashing_disabled_users_searchLouis Chemineau2024-09-233-5/+10
|/ | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* 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>