summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-10-12 17:43:44 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-10-16 21:41:51 +0200
commit8efd037eb89bfc7d4793ce856e4a429141ffe222 (patch)
tree2197008d7b0e954cc7c7302735aa33864d2ab04e /apps
parente46741cf5d222088cc20256462a6d93f85ac27c5 (diff)
downloadnextcloud-server-8efd037eb89bfc7d4793ce856e4a429141ffe222.tar.gz
nextcloud-server-8efd037eb89bfc7d4793ce856e4a429141ffe222.zip
Make shared folder size propagation test work with object home storage
Diffstat (limited to 'apps')
-rw-r--r--apps/encryption/tests/lib/MigrationTest.php2
-rw-r--r--apps/files_sharing/tests/watcher.php10
2 files changed, 5 insertions, 7 deletions
diff --git a/apps/encryption/tests/lib/MigrationTest.php b/apps/encryption/tests/lib/MigrationTest.php
index 6146e4e7cfb..d701aaff0d3 100644
--- a/apps/encryption/tests/lib/MigrationTest.php
+++ b/apps/encryption/tests/lib/MigrationTest.php
@@ -176,7 +176,7 @@ class MigrationTest extends \Test\TestCase {
)->setMethods(['getSystemMountPoints'])->getMock();
$m->expects($this->any())->method('getSystemMountPoints')
- ->willReturn([['mountpoint' => 'folder1'], ['mountpoint' => 'folder2']]);
+ ->will($this->returnValue([['mountpoint' => 'folder1'], ['mountpoint' => 'folder2']]));
$m->reorganizeFolderStructure();
// even if it runs twice folder should always move only once
diff --git a/apps/files_sharing/tests/watcher.php b/apps/files_sharing/tests/watcher.php
index 488792db4ef..5e96a3fe68e 100644
--- a/apps/files_sharing/tests/watcher.php
+++ b/apps/files_sharing/tests/watcher.php
@@ -108,9 +108,8 @@ class Test_Files_Sharing_Watcher extends OCA\Files_sharing\Tests\TestCase {
$this->sharedCache->put('', array('mtime' => 10, 'storage_mtime' => 10, 'size' => '-1', 'mimetype' => 'httpd/unix-directory'));
// run the propagation code
- $result = $this->sharedStorage->getWatcher()->checkUpdate('');
-
- $this->assertTrue($result);
+ $this->sharedStorage->getWatcher()->checkUpdate('');
+ $this->sharedStorage->getCache()->correctFolderSize('');
// the owner's parent dirs must have increase size
$newSizes = self::getOwnerDirSizes('files/container/shareddir');
@@ -139,9 +138,8 @@ class Test_Files_Sharing_Watcher extends OCA\Files_sharing\Tests\TestCase {
$this->sharedCache->put('subdir', array('mtime' => 10, 'storage_mtime' => 10, 'size' => $dataLen, 'mimetype' => 'text/plain'));
// run the propagation code
- $result = $this->sharedStorage->getWatcher()->checkUpdate('subdir');
-
- $this->assertTrue($result);
+ $this->sharedStorage->getWatcher()->checkUpdate('subdir');
+ $this->sharedStorage->getCache()->correctFolderSize('subdir');
// the owner's parent dirs must have increase size
$newSizes = self::getOwnerDirSizes('files/container/shareddir/subdir');