[Pkg-owncloud-commits] [owncloud] 33/129: Make shared folder size propagation test work with object home storage
David Prévot
taffit at moszumanska.debian.org
Thu Nov 5 01:04:20 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch stable8
in repository owncloud.
commit 9ca706b046d03c261b31aed87dce6044ec904cd3
Author: Robin Appelman <icewind at owncloud.com>
Date: Mon Oct 12 17:43:44 2015 +0200
Make shared folder size propagation test work with object home storage
---
apps/encryption/tests/lib/MigrationTest.php | 2 +-
apps/files_sharing/tests/watcher.php | 10 ++++------
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/apps/encryption/tests/lib/MigrationTest.php b/apps/encryption/tests/lib/MigrationTest.php
index 6146e4e..d701aaf 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 488792d..5e96a3f 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');
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list