diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2015-10-09 15:41:09 +0200 |
---|---|---|
committer | Jörn Friedrich Dreyer <jfd@butonic.de> | 2015-10-09 15:41:09 +0200 |
commit | a587a667b9356dc9de2cda332ffc562a3c231709 (patch) | |
tree | ef2b0eee00e2678702d4404a64bcd3b1f5e76770 | |
parent | 8cbf76755e9db0be183165181fbf0cf42f98663f (diff) | |
parent | c8640cdcb02868e5d9766806000e3785ba2ae0ad (diff) | |
download | nextcloud-server-a587a667b9356dc9de2cda332ffc562a3c231709.tar.gz nextcloud-server-a587a667b9356dc9de2cda332ffc562a3c231709.zip |
Merge pull request #19670 from owncloud/objectstore_filesystem_tests
adjust filesystem tests to objectstore
-rw-r--r-- | tests/lib/files/filesystem.php | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/tests/lib/files/filesystem.php b/tests/lib/files/filesystem.php index cc01ed70b5d..15a7c235405 100644 --- a/tests/lib/files/filesystem.php +++ b/tests/lib/files/filesystem.php @@ -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); |