Skip to content
Snippets Groups Projects
Commit cea56df5 authored by Robin Appelman's avatar Robin Appelman
Browse files

Have the filecache updater testcase clean the filesystem properly

parent 31d7f4df
No related branches found
No related tags found
No related merge requests found
...@@ -311,6 +311,7 @@ class Filesystem { ...@@ -311,6 +311,7 @@ class Filesystem {
*/ */
static public function tearDown() { static public function tearDown() {
self::clearMounts(); self::clearMounts();
self::$defaultInstance = null;
} }
/** /**
......
...@@ -42,14 +42,11 @@ class Updater extends \PHPUnit_Framework_TestCase { ...@@ -42,14 +42,11 @@ class Updater extends \PHPUnit_Framework_TestCase {
$this->scanner->scan(''); $this->scanner->scan('');
$this->cache = $this->storage->getCache(); $this->cache = $this->storage->getCache();
\OC\Files\Filesystem::tearDown();
if (!self::$user) { if (!self::$user) {
if (!\OC\Files\Filesystem::getView()) {
self::$user = uniqid(); self::$user = uniqid();
\OC\Files\Filesystem::init(self::$user, '/' . self::$user . '/files');
} else {
self::$user = \OC_User::getUser();
}
} }
\OC\Files\Filesystem::init(self::$user, '/' . self::$user . '/files');
Filesystem::clearMounts(); Filesystem::clearMounts();
Filesystem::mount($this->storage, array(), '/' . self::$user . '/files'); Filesystem::mount($this->storage, array(), '/' . self::$user . '/files');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment