Merge pull request #19670 from owncloud/objectstore_filesystem_tests
adjust filesystem tests to objectstore
This commit is contained in:
commit
a587a667b9
|
@ -325,8 +325,14 @@ class Filesystem extends \Test\TestCase {
|
|||
|
||||
$homeMount = \OC\Files\Filesystem::getStorage('/' . $userId . '/');
|
||||
|
||||
$this->assertTrue($homeMount->instanceOfStorage('\OC\Files\Storage\Home'));
|
||||
$this->assertEquals('home::' . $userId, $homeMount->getId());
|
||||
$this->assertTrue($homeMount->instanceOfStorage('\OCP\Files\IHomeStorage'));
|
||||
if (getenv('RUN_OBJECTSTORE_TESTS')) {
|
||||
$this->assertTrue($homeMount->instanceOfStorage('\OC\Files\ObjectStore\HomeObjectStoreStorage'));
|
||||
$this->assertEquals('object::user:' . $userId, $homeMount->getId());
|
||||
} else {
|
||||
$this->assertTrue($homeMount->instanceOfStorage('\OC\Files\Storage\Home'));
|
||||
$this->assertEquals('home::' . $userId, $homeMount->getId());
|
||||
}
|
||||
|
||||
\OC_User::deleteUser($userId);
|
||||
}
|
||||
|
@ -336,6 +342,9 @@ class Filesystem extends \Test\TestCase {
|
|||
* for the user's mount point
|
||||
*/
|
||||
public function testLegacyHomeMount() {
|
||||
if (getenv('RUN_OBJECTSTORE_TESTS')) {
|
||||
$this->markTestSkipped('legacy storage unrelated to objectstore environments');
|
||||
}
|
||||
$datadir = \OC_Config::getValue("datadirectory", \OC::$SERVERROOT . "/data");
|
||||
$userId = $this->getUniqueID('user_');
|
||||
|
||||
|
@ -380,7 +389,7 @@ class Filesystem extends \Test\TestCase {
|
|||
\OC\Files\Filesystem::getMountPoint('/' . $userId . '/cache')
|
||||
);
|
||||
list($storage, $internalPath) = \OC\Files\Filesystem::resolvePath('/' . $userId . '/cache');
|
||||
$this->assertTrue($storage->instanceOfStorage('\OC\Files\Storage\Home'));
|
||||
$this->assertTrue($storage->instanceOfStorage('\OCP\Files\IHomeStorage'));
|
||||
$this->assertEquals('cache', $internalPath);
|
||||
\OC_User::deleteUser($userId);
|
||||
|
||||
|
|
Loading…
Reference in New Issue