diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2015-10-19 17:18:57 +0200 |
---|---|---|
committer | Jörn Friedrich Dreyer <jfd@butonic.de> | 2015-10-19 17:18:57 +0200 |
commit | 2895c912910a5a24ce6fae5d487ff8136c7a5042 (patch) | |
tree | d661a84df7c55b4260d9efce06882f8b98364ca9 /apps/files_sharing | |
parent | c530c9c322d9475fbbeccce834ba06083d7ae36a (diff) | |
parent | de55f6afbf1eb4bf858ff61e07c6fa475269bea1 (diff) | |
download | nextcloud-server-2895c912910a5a24ce6fae5d487ff8136c7a5042.tar.gz nextcloud-server-2895c912910a5a24ce6fae5d487ff8136c7a5042.zip |
Merge pull request #17641 from owncloud/fix_objectstore_rename
don't move files in cache twice, fixes renaming for objectstores
Diffstat (limited to 'apps/files_sharing')
-rw-r--r-- | apps/files_sharing/tests/sharedstorage.php | 11 | ||||
-rw-r--r-- | apps/files_sharing/tests/watcher.php | 10 |
2 files changed, 11 insertions, 10 deletions
diff --git a/apps/files_sharing/tests/sharedstorage.php b/apps/files_sharing/tests/sharedstorage.php index de510cf1eec..3361d2cbd12 100644 --- a/apps/files_sharing/tests/sharedstorage.php +++ b/apps/files_sharing/tests/sharedstorage.php @@ -47,8 +47,10 @@ class Test_Files_Sharing_Storage extends OCA\Files_sharing\Tests\TestCase { } protected function tearDown() { - $this->view->unlink($this->folder); - $this->view->unlink($this->filename); + if ($this->view) { + $this->view->unlink($this->folder); + $this->view->unlink($this->filename); + } \OC\Files\Filesystem::getLoader()->removeStorageWrapper('oc_trashbin'); @@ -85,8 +87,9 @@ class Test_Files_Sharing_Storage extends OCA\Files_sharing\Tests\TestCase { $this->assertFalse($user2View->is_dir($this->folder)); // delete the local folder - $fullPath = \OC_Config::getValue('datadirectory') . '/' . self::TEST_FILES_SHARING_API_USER2 . '/files/localfolder'; - rmdir($fullPath); + /** @var \OC\Files\Storage\Storage $storage */ + list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath('/' . self::TEST_FILES_SHARING_API_USER2 . '/files/localfolder'); + $storage->rmdir($internalPath); //enforce reload of the mount points self::loginHelper(self::TEST_FILES_SHARING_API_USER2); 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'); |