diff options
author | Morris Jobke <hey@morrisjobke.de> | 2014-12-19 00:26:25 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2014-12-19 00:26:25 +0100 |
commit | 114a6464e87294c27e4967e74b1e3372cf4e92fa (patch) | |
tree | b85876a118a0aaa7fa4336671a2b09fc4d246009 /tests | |
parent | 5dcf4138d7beefe1008ca6ee3f35c106876f6314 (diff) | |
parent | 363e9667ececca66a223934ded569425abd34cdf (diff) | |
download | nextcloud-server-114a6464e87294c27e4967e74b1e3372cf4e92fa.tar.gz nextcloud-server-114a6464e87294c27e4967e74b1e3372cf4e92fa.zip |
Merge pull request #12748 from owncloud/redis_cache
Add Redis cache implementation, prefer over memcached, tests & config sample doc
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/memcache/redis.php | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/lib/memcache/redis.php b/tests/lib/memcache/redis.php new file mode 100644 index 00000000000..c0bd18b46f9 --- /dev/null +++ b/tests/lib/memcache/redis.php @@ -0,0 +1,29 @@ +<?php + +/** + * Copyright (c) 2013 Robin Appelman <icewind@owncloud.com> + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +namespace Test\Memcache; + +class Redis extends Cache { + static public function setUpBeforeClass() { + parent::setUpBeforeClass(); + + if (!\OC\Memcache\Redis::isAvailable()) { + self::markTestSkipped('The redis extension is not available.'); + } + $instance = new \OC\Memcache\Redis(self::getUniqueID()); + if ($instance->set(self::getUniqueID(), self::getUniqueID()) === false) { + self::markTestSkipped('redis server seems to be down.'); + } + } + + protected function setUp() { + parent::setUp(); + $this->instance = new \OC\Memcache\Redis($this->getUniqueID()); + } +} |