aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/tests
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2022-06-10 15:02:37 +0200
committerGitHub <noreply@github.com>2022-06-10 15:02:37 +0200
commit08655a14976ffbcb18aa2fdb557971012d9bcdfe (patch)
tree37b4cd1f5d6817efc9f21c113388059cfd82fe2d /apps/dav/tests
parentbea755f1539e8c918b63347e5ff104f154c99b5c (diff)
parent8e3b30f38876d4a16e8536bbd17ada63789ed8b7 (diff)
downloadnextcloud-server-08655a14976ffbcb18aa2fdb557971012d9bcdfe.tar.gz
nextcloud-server-08655a14976ffbcb18aa2fdb557971012d9bcdfe.zip
Merge pull request #32800 from nextcloud/bugfix/noid/no-fatal-for-maintenance-mode
Don't spam the log with fatals when maintenance mode is enabled or an…
Diffstat (limited to 'apps/dav/tests')
-rw-r--r--apps/dav/tests/unit/Connector/Sabre/ExceptionLoggerPluginTest.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/dav/tests/unit/Connector/Sabre/ExceptionLoggerPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/ExceptionLoggerPluginTest.php
index 3627a177969..a553c0687e0 100644
--- a/apps/dav/tests/unit/Connector/Sabre/ExceptionLoggerPluginTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/ExceptionLoggerPluginTest.php
@@ -32,6 +32,7 @@ use OC\Log;
use OC\SystemConfig;
use OCA\DAV\Connector\Sabre\Exception\InvalidPath;
use OCA\DAV\Connector\Sabre\ExceptionLoggerPlugin;
+use OCA\DAV\Exception\ServerMaintenanceMode;
use Psr\Log\LoggerInterface;
use Sabre\DAV\Exception\NotFound;
use Sabre\DAV\Exception\ServiceUnavailable;
@@ -84,8 +85,10 @@ class ExceptionLoggerPluginTest extends TestCase {
public function providesExceptions() {
return [
['debug', new NotFound()],
- ['debug', new ServiceUnavailable('System in maintenance mode.')],
- ['critical', new ServiceUnavailable('Upgrade needed')],
+ ['debug', new ServerMaintenanceMode('System is in maintenance mode.')],
+ // Faking a translation
+ ['debug', new ServerMaintenanceMode('Syst3m 1s 1n m41nt3n4nc3 m0d3.')],
+ ['debug', new ServerMaintenanceMode('Upgrade needed')],
['critical', new InvalidPath('This path leads to nowhere')]
];
}