Commit graph

416 commits

Author SHA1 Message Date
jknockaert
18a1225b0c enable testRewind 2015-04-24 16:44:00 +02:00
jknockaert
27ea23ea6b Update encryption.php 2015-04-24 16:44:00 +02:00
jknockaert
d6841aa706 disable r+ test 2015-04-24 16:44:00 +02:00
jknockaert
7a34f75da6 add two tests
testRewind tests reading and writing after rewind on an encrypted stream; testWriteWriteRead tests r+ mode
2015-04-24 16:44:00 +02:00
Joas Schilling
4334e77035 Merge pull request #15839 from owncloud/enc_fix_moving_shared_files
[encryption] fix moving files to a shared folder
2015-04-24 15:07:36 +02:00
Joas Schilling
411f7893bf Add test "operation on keys failed" 2015-04-24 14:27:23 +02:00
Joas Schilling
781cfff221 Deduplicate data provider and fix method visibility 2015-04-24 13:12:45 +02:00
Bjoern Schiessle
24128d1384 only update share keys if the file was encrypted 2015-04-24 10:19:09 +02:00
Bjoern Schiessle
2646bccb83 update share keys if file gets copied 2015-04-23 17:18:48 +02:00
Bjoern Schiessle
2990b0e07e update share keys if a file is moved to a shared folder 2015-04-23 17:18:48 +02:00
Vincent Petry
b88d0ba0ac Delete temp files after testing encryption stream wrapper 2015-04-23 13:42:18 +02:00
Vincent Petry
903d52d45f Merge pull request #15809 from owncloud/view-null-root
dont allow using null as view root
2015-04-22 18:10:26 +02:00
Robin Appelman
e302213248 add unit tests for null handling in view 2015-04-22 16:24:25 +02:00
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