From b4624f87ae88181171324d70b014fc7215d0ede7 Mon Sep 17 00:00:00 2001 From: Philipp Date: Sun, 18 Oct 2020 20:47:03 +0200 Subject: [PATCH] Activate redis --- .github/workflows/php.yml | 1 + tests/src/Core/Cache/RedisCacheTest.php | 4 ++-- tests/src/Core/Lock/RedisCacheLockTest.php | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 2ec6dd801..cf1ad1367 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -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] }} diff --git a/tests/src/Core/Cache/RedisCacheTest.php b/tests/src/Core/Cache/RedisCacheTest.php index 9d8d02dec..fcedf81e1 100644 --- a/tests/src/Core/Cache/RedisCacheTest.php +++ b/tests/src/Core/Cache/RedisCacheTest.php @@ -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') diff --git a/tests/src/Core/Lock/RedisCacheLockTest.php b/tests/src/Core/Lock/RedisCacheLockTest.php index b531a5dfe..c373747bd 100644 --- a/tests/src/Core/Lock/RedisCacheLockTest.php +++ b/tests/src/Core/Lock/RedisCacheLockTest.php @@ -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')