From 590c6a7d4b6388db8534cef58065174869a18742 Mon Sep 17 00:00:00 2001
From: Daniel Kesselberg <mail@danielkesselberg.de>
Date: Tue, 11 Mar 2025 12:24:18 +0100
Subject: fix: skip caching lastSeenQuotaUsage for remote shares

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
---
 apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

(limited to 'apps')

diff --git a/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php b/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php
index 0636a251dec..3e297320d15 100644
--- a/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/DirectoryTest.php
@@ -283,8 +283,9 @@ class DirectoryTest extends \Test\TestCase {
 		$storage->expects($this->any())
 			->method('instanceOfStorage')
 			->willReturnMap([
-				'\OCA\Files_Sharing\SharedStorage' => false,
-				'\OC\Files\Storage\Wrapper\Quota' => false,
+				['\OCA\Files_Sharing\SharedStorage', false],
+				['\OC\Files\Storage\Wrapper\Quota', false],
+				[\OCA\Files_Sharing\External\Storage::class, false],
 			]);
 
 		$storage->expects($this->once())
@@ -314,6 +315,10 @@ class DirectoryTest extends \Test\TestCase {
 			->method('getRelativePath')
 			->willReturn('/foo');
 
+		$this->info->expects($this->once())
+			->method('getInternalPath')
+			->willReturn('/foo');
+
 		$mountPoint->method('getMountPoint')
 			->willReturn('/user/files/mymountpoint');
 
@@ -336,6 +341,7 @@ class DirectoryTest extends \Test\TestCase {
 			->willReturnMap([
 				['\OCA\Files_Sharing\SharedStorage', false],
 				['\OC\Files\Storage\Wrapper\Quota', true],
+				[\OCA\Files_Sharing\External\Storage::class, false],
 			]);
 
 		$storage->expects($this->once())
@@ -358,6 +364,10 @@ class DirectoryTest extends \Test\TestCase {
 			->method('getMountPoint')
 			->willReturn($mountPoint);
 
+		$this->info->expects($this->once())
+			->method('getInternalPath')
+			->willReturn('/foo');
+
 		$mountPoint->method('getMountPoint')
 			->willReturn('/user/files/mymountpoint');
 
-- 
cgit v1.2.3