]> git.mxchange.org Git - friendica.git/commitdiff
Activate redis
authorPhilipp <admin@philipp.info>
Sun, 18 Oct 2020 18:47:03 +0000 (20:47 +0200)
committerPhilipp <admin@philipp.info>
Sun, 18 Oct 2020 19:05:19 +0000 (21:05 +0200)
.github/workflows/php.yml
tests/src/Core/Cache/RedisCacheTest.php
tests/src/Core/Lock/RedisCacheLockTest.php

index 2ec6dd801388a31ff44f8cd15876fee530c12404..cf1ad136700b776465a018a985fcb412e5689a63 100644 (file)
@@ -91,6 +91,7 @@ jobs:
           MYSQL_PASSWORD: test
           MYSQL_USER: test
           REDIS_PORT: ${{ job.services.redis.ports[6379] }}
+          REDIS_HOST: 127.0.0.1
           MEMCACHED_PORT: ${{ job.services.memcached.ports[11211] }}
           MEMCACHE_PORT: ${{ job.services.memcached.ports[11211] }}
 
index 9d8d02decd4ddf805247d815c096c40262cb6393..fcedf81e11297974c1d9fd14ccccbe3e40edfe38 100644 (file)
@@ -37,7 +37,7 @@ class RedisCacheTest extends MemoryCacheTest
                $configMock = Mockery::mock(IConfig::class);
 
                $host = $_SERVER['REDIS_HOST'] ?? 'localhost';
-               $port = $_SERVER['REDIS_PORT'] ?? null;
+               $port = $_SERVER['REDIS_PORT'] ?? 6379;
 
                $configMock
                        ->shouldReceive('get')
@@ -51,7 +51,7 @@ class RedisCacheTest extends MemoryCacheTest
                $configMock
                        ->shouldReceive('get')
                        ->with('system', 'redis_db', 0)
-                       ->andReturn(3);
+                       ->andReturn(0);
                $configMock
                        ->shouldReceive('get')
                        ->with('system', 'redis_password')
index b531a5dfe71db31c2faf6ecbd2569f1e13c26c20..c373747bdca8c45356f9b4f46ca54e20f1ed9b9c 100644 (file)
@@ -38,7 +38,7 @@ class RedisCacheLockTest extends LockTest
                $configMock = Mockery::mock(IConfig::class);
 
                $host = $_SERVER['REDIS_HOST'] ?? 'localhost';
-               $port = $_SERVER['REDIS_PORT'] ?? null;
+               $port = $_SERVER['REDIS_PORT'] ?? 6379;
 
                $configMock
                        ->shouldReceive('get')
@@ -52,7 +52,7 @@ class RedisCacheLockTest extends LockTest
                $configMock
                        ->shouldReceive('get')
                        ->with('system', 'redis_db', 0)
-                       ->andReturn(3);
+                       ->andReturn(0);
                $configMock
                        ->shouldReceive('get')
                        ->with('system', 'redis_password')