summaryrefslogtreecommitdiffstats
path: root/tests/lib/Files
Commit message (Collapse)AuthorAgeFilesLines
* Fix folder path containing leading slash when getting mount root by idRobin Appelman2018-11-281-0/+48
| | | | | | | | This fixes collabora on public link shared groupfolders Fixes https://github.com/nextcloud/groupfolders/issues/225 Signed-off-by: Robin Appelman <robin@icewind.nl>
* add test for non existing file by idRobin Appelman2018-11-191-0/+1
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix writeStream for jail wrapperRobin Appelman2018-10-311-0/+17
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* extend storage api to allow directly writing a stream to storageRobin Appelman2018-10-311-0/+49
| | | | | | | | | | | this removes the need for temporary storages with some external storage backends. The new method is added to a separate interface to maintain compatibility with storage backends implementing the storage interface directly (without inheriting common) Currently the interface is implemented for objectstorage based storages and local storage and used by webdav uploads Signed-off-by: Robin Appelman <robin@icewind.nl>
* Move normalizePath to regexes instead of loopingRoeland Jago Douma2018-10-101-61/+68
| | | | | | | | | | | | | This is IMO a bit more readable and it seems to make the code faster. Tested it on the company instance where there are over 3k calls to this function. It shaves off around 10ms. The advantage here is that the pattern gets optimized by php itsel and cached. Also looking for all patterns at the same time and especially no longer looping for /./ patterns should save time. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Remove HHVM checkChristoph Wurst2018-10-091-1/+1
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Moves the logo files to logoMichael Weimann2018-10-025-10/+10
| | | | Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
* make file cache updates more robustBjoern Schiessle2018-07-311-0/+11
| | | | | | only update the encrypted version after the write operation is finished and the stream is closed Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* Separate fopen into read and write methodsJulius Härtl2018-07-111-3/+11
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Add fopen method to ISimpleFileJulius Härtl2018-07-111-0/+8
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Merge pull request #9526 from Blaok/files-scan-shallowRobin Appelman2018-06-251-0/+31
|\ | | | | allow shallow (non-recursive) scan when scanning file storage
| * test: add unit test for files:scan --shallowBlaok2018-05-181-0/+31
| | | | | | | | Signed-off-by: Yuze Chi <i@blaok.me>
* | add azure unit tests with azuriteRobin Appelman2018-06-041-0/+38
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Fix ViewTestRoeland Jago Douma2018-05-231-1/+11
|/ | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Do not allow folder creation with quota of 0Roeland Jago Douma2018-05-031-0/+5
| | | | | | | | | | Fixes #4577 Users with a quota of 0 are a special case. Since they can't (ever) create files on their own storage. Therefor it makes no real that they can create folders (and possible share those etc). Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix testsRoeland Jago Douma2018-04-041-0/+4
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Merge pull request #9018 from nextcloud/fix-copy-encrypted-filesBjörn Schießle2018-04-031-1/+1
|\ | | | | reset encryptionVersion to '1' if a file was stream copied
| * reset encryptionVersion to '1' if a file was stream copied, because this ↵Bjoern Schiessle2018-04-031-1/+1
| | | | | | | | | | | | means that we basically write the file from scratch Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
* | Fix testRoeland Jago Douma2018-03-221-1/+1
|/ | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Hardening of SimpleFile getContentRoeland Jago Douma2018-02-271-0/+22
| | | | | | | if file_get_contents fails remove the file. And traverse up the tree checking if the other folders are there. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* add ci for swift primary storageRobin Appelman2018-02-081-0/+3
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #8033 from nextcloud/s3-uploaderMorris Jobke2018-02-081-5/+12
|\ | | | | Use S3Client::upload instead of splitting single/multipart upload ourselves
| * Use S3Client::upload instead of splitting single/multipart upload ourselvesRobin Appelman2018-01-241-5/+12
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Fix risky tests without assertionsJoas Schilling2018-01-253-2/+5
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Fix "Undefined method setExpectedException()"Joas Schilling2018-01-241-12/+4
|/ | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Remove IAppConfig::getValueRoeland Jago Douma2018-01-171-7/+7
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Support arbitrary number of arguments for d:or and d:and in search queriesRobin Appelman2018-01-161-1/+6
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* removes invalid tests, adapts another oneArthur Schiwon2018-01-031-33/+0
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Merge pull request #6220 from nextcloud/cached-mount-info-filepathLukas Reschke2017-11-091-0/+4
|\ | | | | Allow getting the filepath when getting cached mounts by fileid
| * Allow getting the filepath when getting cached mounts by fileidRobin Appelman2017-10-271-0/+4
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Merge pull request #6958 from ↵Joas Schilling2017-11-011-0/+2
|\ \ | |/ |/| | | | | nextcloud/improved-mimetype-detection-for-object-storage Improve mimetype detection for object storages
| * Improve mimetype detection for object storagesMorris Jobke2017-10-261-0/+2
| | | | | | | | | | | | Object storage instances always fall back to the content based mimetype detection, because the file name for object storage was always random due to the fact that it was temporarily storage in a generated temp file. This patch adds a check before that to make sure to use the original file name for this purpose and also remove possible other extensions like the versioning or part file extension. Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | Use ::class in test mocks of encryption appMorris Jobke2017-10-261-4/+4
| | | | | | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | Use ::class in test mocks of dav appMorris Jobke2017-10-264-7/+8
|/ | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Use ::class in test mocksMorris Jobke2017-10-246-22/+31
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Add tests for multipart uploadRobin Appelman2017-09-211-4/+17
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Cleanup unused methodsMorris Jobke2017-08-151-1/+1
| | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Merge pull request #6123 from nextcloud/cleanup-shareItemMorris Jobke2017-08-151-1/+1
|\ | | | | Cleanup usage of shareItem in internal code base
| * Cleanup usage of shareItem in internal code baseMorris Jobke2017-08-151-1/+1
| | | | | | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | Use proper methods for registerBackendMorris Jobke2017-08-151-2/+2
|/ | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Fix CacheTestRoeland Jago Douma2017-08-091-2/+2
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix encryption testRoeland Jago Douma2017-08-091-2/+3
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Can not insert auto increment on oracleJoas Schilling2017-08-021-18/+23
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix missing escape on column and table nameJoas Schilling2017-08-021-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Replace wrong PHPDocsLukas Reschke2017-08-011-2/+3
| | | | Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
* add tests for renaming paths with multibyte utf8 charactersRobin Appelman2017-07-221-36/+38
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Fix scan permissions with nested permissions masksRobin Appelman2017-07-131-0/+15
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Merge pull request #5424 from nextcloud/moveFromCache-from-sharedMorris Jobke2017-07-061-0/+50
|\ | | | | fix moving folders out of a cache jail
| * fix moving folders out of a cache jailRobin Appelman2017-06-151-0/+50
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | update file system tests to take the master key into accountBjoern Schiessle2017-07-062-15/+25
| | | | | | | | Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>