aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Files
Commit message (Collapse)AuthorAgeFilesLines
...
* Don't leave cursors open when tests failJoas Schilling2020-11-092-2/+9
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Use query builder instead of OC_DB in OC\Files\*Joas Schilling2020-11-091-11/+15
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix code styleMorris Jobke2020-09-091-1/+0
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Make sure tests cover the new mkdir behaviour on 0 quotaJulius Härtl2020-09-081-1/+11
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to ↵Morris Jobke2020-08-1213-117/+117
| | | | | | \PHPUnit\Framework\MockObject\MockObject Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Add config option to enable multibucket preview distributionMorris Jobke2020-08-061-14/+21
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Mount the old previews in a separate folder for the multi bucket setup and ↵Morris Jobke2020-08-061-0/+106
| | | | | | check in them before using the actual locations Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* use exceptions for error signaling in writeStreamRobin Appelman2020-07-231-1/+0
| | | | | | this remove the ambiguity when writing zero length files Signed-off-by: Robin Appelman <robin@icewind.nl>
* rollback cache rename if trashbin move failsRobin Appelman2020-07-231-7/+2
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #21360 from nextcloud/root-storage-prevent-scanningRoeland Jago Douma2020-07-021-0/+59
|\ | | | | prevent the root storage from accidentally scanning user folders
| * prevent the root storage from accidentally scanning user foldersRobin Appelman2020-06-111-0/+59
| | | | | | | | | | | | | | while this scan *should* never be triggered, it's good to have some failsafe to ensure that the users home contents don't end up getting scanned in the root storage Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Fix testsJoas Schilling2020-06-241-1/+0
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Update share type constant usageJoas Schilling2020-06-241-5/+5
|/ | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add lazy events for the Node APIRoeland Jago Douma2020-05-281-38/+97
| | | | | | | | | | | Right now if you want to get events via the Node API you have to have a real instance of the Root. Which in turns sets up the whole FS. We should make sure this is done lazy. Else enabling the preview generator for example makes you setup the whole FS on each and every authenticated call. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix getDirectoryContent implementation for Jail wrapperRobin Appelman2020-04-301-0/+15
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Run cs:fix and fix HashWrapper codeMorris Jobke2020-04-151-1/+3
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Return hashes of uploaded content for dav uploadsRobin Appelman2020-04-131-0/+55
| | | | | | | | hashes are set in "X-Hash-MD5", "X-Hash-SHA1" and "X-Hash-SHA256" headers. these headers are set for file uploads and the MOVE request at the end of a multipart upload. Signed-off-by: Robin Appelman <robin@icewind.nl>
* Add visibility to all constantsChristoph Wurst2020-04-102-4/+4
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add visibility to all methods and position of static keywordChristoph Wurst2020-04-1010-39/+39
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-1022-51/+31
| | | | | | | | | | | | | | | To continue this formatting madness, here's a tiny patch that adds unified formatting for control structures like if and loops as well as classes, their methods and anonymous functions. This basically forces the constructs to start on the same line. This is not exactly what PSR2 wants, but I think we can have a few exceptions with "our" style. The starting of braces on the same line is pracrically standard for our code. This also removes and empty lines from method/function bodies at the beginning and end. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use elseif instead of else ifChristoph Wurst2020-04-102-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Remove trailing and in between spacesChristoph Wurst2020-04-091-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Unify function spacing to PSR2 recommendationChristoph Wurst2020-04-096-15/+15
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use a blank line after the opening tagChristoph Wurst2020-04-094-3/+10
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use exactly one empty line after the namespace declarationChristoph Wurst2020-04-094-4/+0
| | | | | | For PSR2 Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix (array) indent style to always use one tabChristoph Wurst2020-04-091-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #20033 from nextcloud/s3-seekable-streamRoeland Jago Douma2020-04-062-4/+20
|\ | | | | Enable fseek for files in S3 storage
| * add basic tests for s3 seeking and add some error handling if reopen return ↵Robin Appelman2020-04-012-4/+20
| | | | | | | | | | | | the wrong range Signed-off-by: Robin Appelman <robin@icewind.nl>
* | fix testsRobin Appelman2020-04-011-6/+26
|/ | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #20170 from nextcloud/techdebt/remove-unused-importsChristoph Wurst2020-03-2710-16/+0
|\ | | | | Remove unused imports
| * Remove unused importsChristoph Wurst2020-03-2510-16/+0
| | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Use the short array syntax, everywhereChristoph Wurst2020-03-2630-326/+326
| | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Merge pull request #20172 from nextcloud/techdebt/phpunit-short-returnChristoph Wurst2020-03-2612-215/+215
|\ \ | | | | | | Use the shorter phpunit syntax for mocked return values
| * | Use the shorter phpunit syntax for mocked return valuesChristoph Wurst2020-03-2512-215/+215
| |/ | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* / Use lowercase true, false and null constantsChristoph Wurst2020-03-251-2/+2
|/ | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* better tests for SimpleFolderRobin Appelman2020-02-281-71/+48
| | | | | | test behavior, not implementation Signed-off-by: Robin Appelman <robin@icewind.nl>
* Add typed events for the filesystem/scannerChristoph Wurst2019-12-132-9/+11
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* REVERT ME: comment out failing gz detection testRoeland Jago Douma2019-12-121-1/+1
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Update the unit test to dataProvidersJoas Schilling2019-12-101-42/+77
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Move custom definition logic into methodDaniel Kesselberg2019-12-091-3/+2
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Ensure that we don't merge broken json.Daniel Kesselberg2019-12-091-8/+14
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Merge pull request #17833 from nextcloud/propagator-no-negative-sizesRoeland Jago Douma2019-12-041-0/+11
|\ | | | | dont set folder size to negative values during propagation
| * dont set folder size to negative values during propagationRobin Appelman2019-11-261-0/+11
| | | | | | | | | | | | | | | | | | | | normally this shouldn't be a problem, but cache/storage desync might cause this so this adds some failsafe to ensure we dont corrupt the cache further the minimum value is set to -1 instead of 0 in order to triger a background scan on the folder and figure out the size properly Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Merge pull request #18028 from nextcloud/enhancement/user-create-eventsRoeland Jago Douma2019-12-033-5/+8
|\ \ | | | | | | Add typed create user events
| * | Add typed create user eventsChristoph Wurst2019-12-033-5/+8
| | | | | | | | | | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at> Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | | Fix testsJohn Molakvoæ (skjnldsv)2019-12-021-2/+4
|/ / | | | | | | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
* | Mode to modern phpunitRoeland Jago Douma2019-11-2728-172/+186
| | | | | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | More fixesRoeland Jago Douma2019-11-271-6/+15
| | | | | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | More fixesRoeland Jago Douma2019-11-271-2/+6
| | | | | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Make phpunit8 compatibleRoeland Jago Douma2019-11-2743-66/+66
| | | | | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>