]> source.dussan.org Git - nextcloud-server.git/commitdiff
Have the filecache updater testcase clean the filesystem properly
authorRobin Appelman <icewind@owncloud.com>
Thu, 25 Apr 2013 14:56:48 +0000 (16:56 +0200)
committerMichael Gapczynski <mtgap@owncloud.com>
Wed, 22 May 2013 19:04:39 +0000 (15:04 -0400)
lib/files/filesystem.php
tests/lib/files/cache/updater.php

index 2b090ccba767ea3eb35c1793c6ef9701e5e1fdec..9edbbf1b34b9d3fbe9a72811e4acc0f42d515df0 100644 (file)
@@ -310,6 +310,7 @@ class Filesystem {
         */
        static public function tearDown() {
                self::clearMounts();
+               self::$defaultInstance = null;
        }
 
        /**
index aaf932c97feb88a086d4545e7c7b4bd44d348c70..dad3cd7e6503cf671375fd1049bc8b7cc3e3f9fa 100644 (file)
@@ -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');