aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/Files/Cache
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2022-02-23 18:29:08 +0100
committerRobin Appelman <robin@icewind.nl>2022-03-04 16:29:59 +0100
commit1c468129afa2b2ec4a370a879f8eaffd22768baf (patch)
tree1c096e8c0a62371965104684e1f1bf2ef55eb2d4 /tests/lib/Files/Cache
parent5c0fe934988960ece3ac71d5a1dfc8df405413aa (diff)
downloadnextcloud-server-1c468129afa2b2ec4a370a879f8eaffd22768baf.tar.gz
nextcloud-server-1c468129afa2b2ec4a370a879f8eaffd22768baf.zip
adjust tests to new fs setup
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'tests/lib/Files/Cache')
-rw-r--r--tests/lib/Files/Cache/UpdaterLegacyTest.php6
-rw-r--r--tests/lib/Files/Cache/UpdaterTest.php2
2 files changed, 5 insertions, 3 deletions
diff --git a/tests/lib/Files/Cache/UpdaterLegacyTest.php b/tests/lib/Files/Cache/UpdaterLegacyTest.php
index 6d6cc08b3de..be0390db15e 100644
--- a/tests/lib/Files/Cache/UpdaterLegacyTest.php
+++ b/tests/lib/Files/Cache/UpdaterLegacyTest.php
@@ -10,6 +10,7 @@ namespace Test\Files\Cache;
use OC\Files\Filesystem as Filesystem;
use OC\Files\View;
+use OCP\Files\Mount\IMountManager;
/**
* Class UpdaterLegacyTest
@@ -61,7 +62,10 @@ class UpdaterLegacyTest extends \Test\TestCase {
Filesystem::init(self::$user, '/' . self::$user . '/files');
- Filesystem::clearMounts();
+ /** @var IMountManager $manager */
+ $manager = \OC::$server->get(IMountManager::class);
+ $manager->removeMount('/' . self::$user);
+
Filesystem::mount($this->storage, [], '/' . self::$user . '/files');
\OC_Hook::clear('OC_Filesystem');
diff --git a/tests/lib/Files/Cache/UpdaterTest.php b/tests/lib/Files/Cache/UpdaterTest.php
index 4c99b24d9d6..7e0f6866793 100644
--- a/tests/lib/Files/Cache/UpdaterTest.php
+++ b/tests/lib/Files/Cache/UpdaterTest.php
@@ -50,8 +50,6 @@ class UpdaterTest extends \Test\TestCase {
}
protected function tearDown(): void {
- Filesystem::clearMounts();
-
$this->logout();
parent::tearDown();
}