diff options
author | Joas Schilling <coding@schilljs.com> | 2022-06-10 00:36:52 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2022-06-10 00:36:52 +0200 |
commit | 8e3b30f38876d4a16e8536bbd17ada63789ed8b7 (patch) | |
tree | 78ea688b1e4111d3dd58c8da45fb31a0d1e1a6db /apps/dav/tests/unit/Connector/Sabre/ExceptionLoggerPluginTest.php | |
parent | 0523626b98ea356842b0c49e63808b300bb2096d (diff) | |
download | nextcloud-server-8e3b30f38876d4a16e8536bbd17ada63789ed8b7.tar.gz nextcloud-server-8e3b30f38876d4a16e8536bbd17ada63789ed8b7.zip |
Don't spam the log with fatals when maintenance mode is enabled or an upgrade has to be done
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/dav/tests/unit/Connector/Sabre/ExceptionLoggerPluginTest.php')
-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')] ]; } |