mirror of
https://github.com/nextcloud/server.git
synced 2026-06-13 10:40:40 -04:00
Make shared folder size propagation test work with object home storage
This commit is contained in:
parent
e46741cf5d
commit
8efd037eb8
2 changed files with 5 additions and 7 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Reference in a new issue