From eee8b309e651c8647614429cc5f99ddd914a2397 Mon Sep 17 00:00:00 2001 From: Edward Ly Date: Thu, 20 Mar 2025 08:53:38 -0700 Subject: fix(Quota): throw NotEnoughSpaceException if file quota exceeded for mkdir operation Signed-off-by: Edward Ly --- tests/lib/Files/Storage/Wrapper/QuotaTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/lib/Files/Storage/Wrapper/QuotaTest.php b/tests/lib/Files/Storage/Wrapper/QuotaTest.php index f07e6021e4e..22703785c47 100644 --- a/tests/lib/Files/Storage/Wrapper/QuotaTest.php +++ b/tests/lib/Files/Storage/Wrapper/QuotaTest.php @@ -10,6 +10,7 @@ namespace Test\Files\Storage\Wrapper; //ensure the constants are loaded use OC\Files\Cache\CacheEntry; use OC\Files\Storage\Local; +use OCP\Files\NotEnoughSpaceException; \OC::$loader->load('\OC\Files\Filesystem'); @@ -211,7 +212,8 @@ class QuotaTest extends \Test\Files\Storage\Storage { public function testNoMkdirQuotaZero(): void { $instance = $this->getLimitedStorage(0.0); $this->assertFalse($instance->mkdir('files')); - $this->assertFalse($instance->mkdir('files/foobar')); + $this->expectException(NotEnoughSpaceException::class); + $instance->mkdir('files/foobar'); } public function testMkdirQuotaZeroTrashbin(): void { -- cgit v1.2.3