Thomas Müller
225cde2183
pass KeyStorage via ctor
2015-04-22 13:09:42 +02:00
Thomas Müller
987bc138df
calling renameKeys() on directory level as well - fixes #15778
2015-04-22 12:12:27 +02:00
Thomas Müller
fc4127dd62
add $encryptionModuleId to methods of Keys/IStorage
2015-04-22 11:53:05 +02:00
Björn Schießle
570718fb6b
Merge pull request #15757 from owncloud/enc-fixfeofforlastblock
...
Fix encryption feof to not return too early
2015-04-22 11:32:21 +02:00
Bjoern Schiessle
19e8c4fcb1
get dirname from sharePath
2015-04-21 14:58:01 +02:00
Vincent Petry
76dad297ff
Fix encryption feof to not return too early
...
This is because stream_read will pre-cache the next block which causes
feof($this->source) to return true prematurely. So we cannot rely on it.
Fixed encryption stream wrapper unit tests to actually simulate 6k/8k
blocks to make sure we cover the matching logic.
Added two data files with 8192 and 8193 bytes.
2015-04-20 18:32:40 +02:00
Bjoern Schiessle
b25c06f576
detect system wide mount points correctly
2015-04-16 14:15:04 +02:00
Björn Schießle
4f0437fbde
Merge pull request #15598 from owncloud/fix-enc-file-size-master
...
Fix file size of encrypted files
2015-04-14 16:48:04 +02:00
Morris Jobke
82cab25762
Merge pull request #13360 from owncloud/cross-storage-move
...
Proper copy/move between multiple local storages
2015-04-14 14:35:08 +02:00
Thomas Müller
cbe30f740e
remove calculateUnencryptedSize() - not needed
2015-04-14 13:08:59 +02:00
Robin Appelman
01da6be4d6
upda tests
2015-04-13 17:10:02 +02:00
Robin Appelman
d7b3a1a35a
preserve cache data when doing a cross storage move
2015-04-13 17:10:01 +02:00
Robin Appelman
0772e3b4c1
Properly handle copy/move failures in cross storage copy/move
2015-04-13 15:13:03 +02:00
Robin Appelman
31e94708f8
Improve cross storage copy between local storages
2015-04-13 15:13:02 +02:00
Vincent Petry
2822d0579e
Properly add trailing slash to mount point
...
Fixes resolving mount points when shared mount point's target name has
the same prefix as the source name
2015-04-13 12:36:47 +02:00
Jörn Friedrich Dreyer
fafecd1c05
fix cherrypicking
2015-04-10 11:08:24 +02:00
Jörn Friedrich Dreyer
a85bc5538f
fix filesystem and encryption tests
...
Conflicts:
apps/files_encryption/lib/util.php
apps/files_encryption/tests/hooks.php
2015-04-10 09:12:37 +02:00
Thomas Müller
06a5a9d0c2
Fix mock object to return proper type
2015-04-09 18:30:45 +02:00
Thomas Müller
11c3741526
Fix mock object to return proper type
2015-04-09 17:45:57 +02:00
Vincent Petry
f8cfc03f36
Replace originalStorage in tests with a proper teardown
...
The purpose of $originalStorage in unit tests was to remount the old
root.
However that storage itself is already wrapped by storage wrapper, so
remounting it would rewrap the storage several times.
This fix makes use of "loginAsUser()" and "logout()" from the TestCase
class to properly initialize and cleanup the FS as expected.
2015-04-08 12:45:38 +02:00
Thomas Müller
2d2cb09715
fixing unit test - expected value change due to different size being stored in cache table
2015-04-07 14:30:01 +02:00
Thomas Müller
268d346b36
fixing unit tests
2015-04-07 13:30:31 +02:00
Thomas Müller
fce42a3161
fixing unit test execution - test dummy module was behaving wrong
2015-04-07 13:30:31 +02:00
Thomas Müller
870c53ee37
fixing unit test execution
2015-04-07 13:30:31 +02:00
Thomas Müller
3e3226da4c
Properly set size and unencrypted size in the stream unit tests
2015-04-07 13:30:31 +02:00
Thomas Müller
b3c5ef3afe
Adding unit test for read and write of big file
2015-04-07 13:30:31 +02:00
Thomas Müller
104d11ec4c
Fixing encryption storage wrapper tests
2015-04-07 13:30:30 +02:00
Thomas Müller
e8e5bd61ae
fixing unit tests for encryption stream wrapper seek
2015-04-07 13:30:30 +02:00
Thomas Müller
8ffa6db110
fixing unit tests for stream wrapper
2015-04-07 13:30:30 +02:00
Thomas Müller
e0ab2c34ea
update unit tests after ctor signature change of \OC\Encryption\Util
2015-04-07 13:30:28 +02:00
Thomas Müller
00338f9dca
Removing files_encryption left overs
2015-04-07 13:30:28 +02:00
Bjoern Schiessle
0eee3a2618
remove unencrypted_size from the cache, size will contain the unencrypted size
2015-04-07 13:30:28 +02:00
Thomas Müller
498625ea3a
adding unit tests for stream wrapper
2015-04-07 13:30:28 +02:00
Thomas Müller
a905f641b3
various fixes & start to unit test the encryption storage wrapper
2015-04-07 13:30:28 +02:00
Vincent Petry
5c9998179f
Properly quote file names in listFiles query for GDrive
2015-03-31 15:14:03 +02:00
Lukas Reschke
53f67fc65d
Revert "Properly quote file names in listFiles query for GDrive"
2015-03-31 15:12:35 +02:00
Frank Karlitschek
b216b3fad0
Merge pull request #15215 from owncloud/ext-gdrivelistfilequoting
...
Properly quote file names in listFiles query for GDrive
2015-03-31 09:08:59 -04:00
Thomas Müller
722e50a112
Merge pull request #15240 from owncloud/storage-wrapper-priority
...
add priority to storage wrappers
2015-03-27 15:18:44 +01:00
Robin Appelman
cb9ead7dde
add priority to storage wrappers
2015-03-26 21:26:38 +01:00
Vincent Petry
43588fe2f7
Properly quote file names in listFiles query for GDrive
2015-03-26 12:15:02 +01:00
Vincent Petry
ec2d7cff2f
SQLite autoincrement test
2015-03-25 18:33:21 +01:00
Robin Appelman
d11f01fa0f
Add `getNonExistingName()` to the node api
2015-03-24 15:00:36 +01:00
Robin Appelman
73874ca27f
Merge pull request #14704 from owncloud/storage-wrapper-mount
...
pass mountpoint to storage wrapper callback
2015-03-19 16:20:38 +01:00
Joas Schilling
f2f7f178a5
Add test for backticks in path and etag
2015-03-18 13:29:39 +01:00
Vincent Petry
e50f13d46b
Add positive test for path verification
2015-03-17 18:17:30 +01:00
Robin Appelman
7ab919256b
fix test
2015-03-16 14:13:56 +01:00
Thomas Müller
80ef53eff0
verify the file name length not to exceed 255 characters + verify path during rename
2015-03-12 10:47:47 +01:00
Robin Appelman
169031d1c5
fix factory test
2015-03-11 15:07:59 +01:00
Robin Appelman
e1f2a6df94
Allow setting the watcher policy as mount option
2015-03-11 15:07:23 +01:00
Robin Appelman
7adda88786
Copy mount options to the storage
2015-03-11 15:06:48 +01:00
Robin Appelman
82a62fd249
Add test for storage factory
2015-03-11 15:06:12 +01:00
Thomas Müller
3623f14e73
no translation service in common storage class
2015-03-09 10:38:38 +01:00
Thomas Müller
4bac595068
adding storage specific filename verification - refs #13640
2015-03-09 10:38:37 +01:00
Joas Schilling
294724b5da
Add a test for ObjectStore\NoopScanner
2015-03-04 11:48:31 +01:00
Robin Appelman
89735ab22b
add some tests for disabled updater
2015-02-27 17:14:17 +01:00
Robin Appelman
fc027bceb7
Fix cache update when doing a rename that overwrites the target
2015-02-27 16:39:58 +01:00
Thomas Müller
7fe07e93fe
Merge pull request #14437 from owncloud/node-check-fileinfo
...
Check if we have a proper fileinfo
2015-02-27 02:56:13 -08:00
Lukas Reschke
9baf758150
Merge pull request #14503 from owncloud/quota-preventdatalossforfailedmove
...
Fix file move/copy when storage space is not enough
2015-02-26 16:35:13 +01:00
Vincent Petry
232de3bdc0
Delete target file for unsuccessful copy/rename
2015-02-26 15:11:37 +01:00
Robin Appelman
541c8c092d
Add unit test
2015-02-26 12:20:20 +01:00
Vincent Petry
20738d287e
Properly detect streamCopy errors
...
Now checking whether the written bytes match the number of read bytes.
2015-02-25 16:03:15 +01:00
Joas Schilling
993d89b3cc
Extend the class so the Filesystem is cleaned up
2015-02-25 16:03:10 +01:00
Lukas Reschke
41e5850450
Prevent directory traversals in ctr of \OC\Files\View
...
This prevents a misusage of \OC\Files\View by calling it with user-supplied input. In such cases an exception is now thrown.
2015-02-18 18:17:33 +01:00
Robin Appelman
6ecfcde954
update test
2015-02-13 15:01:05 +01:00
Robin Appelman
134243d3e5
Dont lower the mtime of a folder when propagating changes
2015-02-13 14:30:05 +01:00
Lukas Reschke
4d91fa4c93
Normalize before processing
2015-02-06 15:03:29 +01:00
Bjoern Schiessle
21c45925fe
detect root of mountpoint also if the trailing slash is missed
2015-02-04 12:47:04 +01:00
Robin Appelman
2124540d1d
Dont remove a file from cache if the delete operation failed
2015-01-29 15:39:56 +01:00
Robin Appelman
ddee63fa00
Fix resolving paths for views rooted in a file
2015-01-29 12:47:11 +01:00
Robin Appelman
cec43df0f0
Add unit test
2015-01-28 13:44:39 +01:00
Morris Jobke
752b94d363
Merge pull request #13717 from owncloud/storage-donotwrapnullstorage
...
Prevent wrapping null storage
2015-01-28 01:00:20 +01:00
Vincent Petry
6d8985b671
Prevent wrapping null storage
...
Can happen when trying to instantiate external storages that have
incomplete config, where the constructor throws an exception (the
exception is caught in createStorage())
2015-01-27 17:40:08 +01:00
Robin Appelman
87a1b2bdc4
Preserve mtime when doing cross storage move
2015-01-23 15:11:27 +01:00
Robin Appelman
0a3e0a1665
Additional unit test for recursive remove
2015-01-15 18:47:05 +01:00
Thomas Müller
337c43ce92
Merge pull request #13317 from owncloud/partfile-fileinfo
...
Return valid fileinfo objects for part files
2015-01-14 22:39:19 +01:00
Robin Appelman
96dff341e2
Return valid fileinfo objects for part files
2015-01-13 13:59:28 +01:00
Vincent Petry
fcc3b3d5f7
Fix searchCommon to properly match path name
...
The internal path was matched without the last "/" which caused
"files_trashbin" to also match when the internal path was "files".
This adds the missing slash for the comparison.
2015-01-12 19:33:00 +01:00
Lukas Reschke
05615bfd47
Simplify isValidPath and add unit tests
...
The check for invalid paths is actually over-complicated and performed twice resulting in a performance penalty. Additionally, I decided to add unit-tests to that function.
Part of https://github.com/owncloud/core/issues/13221
2015-01-10 00:40:21 +01:00
Vincent Petry
aa821ecc00
Trim leading or trailing slashes in file cache paths
2015-01-08 19:43:02 +01:00
Thomas Müller
fe6f4a1404
Merge pull request #11810 from owncloud/hhvm-autotest
...
Adding autotest-hhvm.sh [WIP]
2014-12-22 14:12:03 +01:00
Andreas Fischer
48d6724a6f
HHVM sets stream meta datum wrapper_type to 'File' instead of 'user-space'.
2014-12-19 00:58:37 +01:00
Robin Appelman
fd85424742
Add getMountPoint to FileInfo
2014-12-17 14:03:50 +01:00
Vincent Petry
5007289422
Sort results to make sure assert work on consistent order
2014-12-15 11:32:32 +01:00
Vincent Petry
4b57892c4e
Merge pull request #12778 from owncloud/searchbytags2
...
Added searchByTags to view, storage and cache
2014-12-12 14:27:19 +01:00
Vincent Petry
15ecb28d50
Make $userId mandatory for searchByTags
...
$userId is now a mandatory parameter for searchByTags.
Also fixed some places in the code where the argument was missing (Node
API and View)
2014-12-12 11:18:35 +01:00
Vincent Petry
25dde7e93b
Added searchByTags to view, storage and cache
2014-12-11 17:38:50 +01:00
Thomas Müller
6143232da6
Merge pull request #12746 from owncloud/skip-longpath-test-again
...
skip testLongPath()
2014-12-10 17:22:04 +01:00
Vincent Petry
ebba54d490
Fix numeric storage id for cache wrapper
2014-12-10 13:05:31 +01:00
Thomas Müller
d648b548eb
skip testLongPath()
2014-12-10 12:20:30 +01:00
Robin Appelman
f4701d7721
Add public api for mount configurations
2014-12-04 16:47:27 +01:00
Morris Jobke
f3213571bb
Merge pull request #12616 from owncloud/node-fileinfo
...
make \OC\Files\Node\Node implement the FileInfo interface
2014-12-04 16:34:30 +01:00
Robin Appelman
672495a1a3
make \OC\Files\Node\Node implement the FileInfo interface
2014-12-04 13:27:08 +01:00
Morris Jobke
2c5e4b3d3f
Remove last traces of travis integration
2014-12-04 10:09:13 +01:00
Joas Schilling
ea4c25609d
Replace uniqid calls with $this->getUniqueID so tests pass again on windows
2014-12-03 12:10:55 +01:00
Robin Appelman
33b64868d7
Add storage and cache wrappers to apply a permissions mask to a storage
2014-11-27 15:25:57 +01:00
Robin Appelman
abb6e89c5d
Add storage and cache wrappers to jail a storage to a subfolder
2014-11-27 15:25:53 +01:00
Joas Schilling
2c39aec8cb
Replace deprecated constant with new class constant
2014-11-25 16:30:21 +01:00
Joas Schilling
76ebd3a050
Make apps/ extend the \Test\TestCase and fix overwritten methods
2014-11-19 14:52:09 +01:00
Joas Schilling
bb540722cd
Use base class to reset the file mapper
2014-11-19 14:52:07 +01:00
Lukas Reschke
8071657cd5
Merge pull request #12234 from owncloud/normalizepath-absolute-tests
...
Add tests for normalizePath() with absolute paths on windows
2014-11-18 10:24:46 +01:00