Have the filecache updater testcase clean the filesystem properly
This commit is contained in:
parent
31d7f4df2a
commit
cea56df59e
2 changed files with 4 additions and 6 deletions
|
@ -311,6 +311,7 @@ class Filesystem {
|
|||
*/
|
||||
static public function tearDown() {
|
||||
self::clearMounts();
|
||||
self::$defaultInstance = null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
9
tests/lib/files/cache/updater.php
vendored
9
tests/lib/files/cache/updater.php
vendored
|
@ -42,14 +42,11 @@ class Updater extends \PHPUnit_Framework_TestCase {
|
|||
$this->scanner->scan('');
|
||||
$this->cache = $this->storage->getCache();
|
||||
|
||||
\OC\Files\Filesystem::tearDown();
|
||||
if (!self::$user) {
|
||||
if (!\OC\Files\Filesystem::getView()) {
|
||||
self::$user = uniqid();
|
||||
\OC\Files\Filesystem::init(self::$user, '/' . self::$user . '/files');
|
||||
} else {
|
||||
self::$user = \OC_User::getUser();
|
||||
}
|
||||
self::$user = uniqid();
|
||||
}
|
||||
\OC\Files\Filesystem::init(self::$user, '/' . self::$user . '/files');
|
||||
|
||||
Filesystem::clearMounts();
|
||||
Filesystem::mount($this->storage, array(), '/' . self::$user . '/files');
|
||||
|
|
Loading…
Reference in a new issue