From 1c468129afa2b2ec4a370a879f8eaffd22768baf Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 23 Feb 2022 18:29:08 +0100 Subject: adjust tests to new fs setup Signed-off-by: Robin Appelman --- tests/lib/Files/Cache/UpdaterLegacyTest.php | 6 +++++- tests/lib/Files/Cache/UpdaterTest.php | 2 -- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'tests/lib/Files/Cache') 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(); } -- cgit v1.2.3