aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2014-12-10 12:24:20 +0100
committerJörn Friedrich Dreyer <jfd@butonic.de>2014-12-10 12:24:20 +0100
commit363e9667ececca66a223934ded569425abd34cdf (patch)
treeb331d7c5df5bb8f4698a7b5740fdd626d3cbd2a6 /tests
parente3de51078d4c9eb26eb7f09a98ff97c371ae9180 (diff)
downloadnextcloud-server-363e9667ececca66a223934ded569425abd34cdf.tar.gz
nextcloud-server-363e9667ececca66a223934ded569425abd34cdf.zip
Add Redis cache implementation, prefer over memcached, tests & config sample
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/memcache/redis.php29
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());
+ }
+}