Skip redis if not configured

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2019-11-22 08:50:47 +01:00
parent 4bed12e4d6
commit 385ec2947d
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 4 additions and 0 deletions

View File

@ -17,6 +17,10 @@ class RedisTest extends Cache {
self::markTestSkipped('The redis extension is not available.'); self::markTestSkipped('The redis extension is not available.');
} }
if (\OC::$server->getConfig()->getSystemValue('redis', []) === []) {
self::markTestSkipped('Redis not configured in config.php');
}
$errorOccurred = false; $errorOccurred = false;
set_error_handler( set_error_handler(
function($errno, $errstr) { function($errno, $errstr) {