diff options
author | Vincent Petry <vincent@nextcloud.com> | 2022-06-10 15:02:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-10 15:02:37 +0200 |
commit | 08655a14976ffbcb18aa2fdb557971012d9bcdfe (patch) | |
tree | 37b4cd1f5d6817efc9f21c113388059cfd82fe2d /apps/dav/tests | |
parent | bea755f1539e8c918b63347e5ff104f154c99b5c (diff) | |
parent | 8e3b30f38876d4a16e8536bbd17ada63789ed8b7 (diff) | |
download | nextcloud-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.php | 7 |
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')] ]; } |