Browse Source

Remove legacy home tests

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
pull/2846/head
Vincent Petry 9 years ago
committed by Lukas Reschke
parent
commit
7ca6561469
No known key found for this signature in database GPG Key ID: B9F6980CF6E759B1
  1. 31
      tests/lib/Files/FilesystemTest.php

31
tests/lib/Files/FilesystemTest.php

@ -426,37 +426,6 @@ class FilesystemTest extends \Test\TestCase {
if ($user !== null) { $user->delete(); }
}
/**
* Tests that the home storage is used in legacy mode
* for the user's mount point
*/
public function testLegacyHomeMount() {
if (getenv('RUN_OBJECTSTORE_TESTS')) {
$this->markTestSkipped('legacy storage unrelated to objectstore environments');
}
$datadir = \OC::$server->getConfig()->getSystemValue("datadirectory", \OC::$SERVERROOT . "/data");
$userId = $this->getUniqueID('user_');
// insert storage into DB by constructing it
// to make initMountsPoint find its existence
$localStorage = new \OC\Files\Storage\Local(array('datadir' => $datadir . '/' . $userId . '/'));
// this will trigger the insert
$cache = $localStorage->getCache();
\OC::$server->getUserManager()->createUser($userId, $userId);
\OC\Files\Filesystem::initMountPoints($userId);
$homeMount = \OC\Files\Filesystem::getStorage('/' . $userId . '/');
$this->assertTrue($homeMount->instanceOfStorage('\OC\Files\Storage\Home'));
$this->assertEquals('local::' . $datadir . '/' . $userId . '/', $homeMount->getId());
$user = \OC::$server->getUserManager()->get($userId);
if ($user !== null) { $user->delete(); }
// delete storage entry
$cache->clear();
}
public function dummyHook($arguments) {
$path = $arguments['path'];
$this->assertEquals($path, \OC\Files\Filesystem::normalizePath($path)); //the path passed to the hook should already be normalized

Loading…
Cancel
Save