minor #39095 [Cache] Run Redis Sentinel tests in GithubAction (jderusse)
This PR was merged into the 4.4 branch.
Discussion
----------
[Cache] Run Redis Sentinel tests in GithubAction
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Add support for Sentinel tests in GHA
Commits
-------
bd84394dc5
Run Redis Sentinel tests in GithubAction
This commit is contained in:
commit
728574d94f
13
.github/workflows/tests.yml
vendored
13
.github/workflows/tests.yml
vendored
@ -40,9 +40,16 @@ jobs:
|
|||||||
- 7004:7004
|
- 7004:7004
|
||||||
- 7005:7005
|
- 7005:7005
|
||||||
- 7006:7006
|
- 7006:7006
|
||||||
- 7007:7007
|
|
||||||
env:
|
env:
|
||||||
STANDALONE: true
|
STANDALONE: 1
|
||||||
|
redis-sentinel:
|
||||||
|
image: bitnami/redis-sentinel:6.0
|
||||||
|
ports:
|
||||||
|
- 26379:26379
|
||||||
|
env:
|
||||||
|
REDIS_MASTER_HOST: redis
|
||||||
|
REDIS_MASTER_SET: redis_sentinel
|
||||||
|
REDIS_SENTINEL_QUORUM: 1
|
||||||
memcached:
|
memcached:
|
||||||
image: memcached:1.6.5
|
image: memcached:1.6.5
|
||||||
ports:
|
ports:
|
||||||
@ -101,6 +108,8 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
REDIS_HOST: localhost
|
REDIS_HOST: localhost
|
||||||
REDIS_CLUSTER_HOSTS: 'localhost:7000 localhost:7001 localhost:7002 localhost:7003 localhost:7004 localhost:7005'
|
REDIS_CLUSTER_HOSTS: 'localhost:7000 localhost:7001 localhost:7002 localhost:7003 localhost:7004 localhost:7005'
|
||||||
|
REDIS_SENTINEL_HOSTS: 'localhost:26379'
|
||||||
|
REDIS_SENTINEL_SERVICE: redis_sentinel
|
||||||
MESSENGER_REDIS_DSN: redis://127.0.0.1:7006/messages
|
MESSENGER_REDIS_DSN: redis://127.0.0.1:7006/messages
|
||||||
MESSENGER_AMQP_DSN: amqp://localhost/%2f/messages
|
MESSENGER_AMQP_DSN: amqp://localhost/%2f/messages
|
||||||
MEMCACHED_HOST: localhost
|
MEMCACHED_HOST: localhost
|
||||||
|
@ -37,7 +37,7 @@ class RedisAdapterSentinelTest extends AbstractRedisAdapterTest
|
|||||||
public function testInvalidDSNHasBothClusterAndSentinel()
|
public function testInvalidDSNHasBothClusterAndSentinel()
|
||||||
{
|
{
|
||||||
$this->expectException('Symfony\Component\Cache\Exception\InvalidArgumentException');
|
$this->expectException('Symfony\Component\Cache\Exception\InvalidArgumentException');
|
||||||
$this->expectExceptionMessage('Invalid Redis DSN: cannot use both redis_cluster and redis_sentinel at the same time');
|
$this->expectExceptionMessage('Cannot use both "redis_cluster" and "redis_sentinel" at the same time:');
|
||||||
$dsn = 'redis:?host[redis1]&host[redis2]&host[redis3]&redis_cluster=1&redis_sentinel=mymaster';
|
$dsn = 'redis:?host[redis1]&host[redis2]&host[redis3]&redis_cluster=1&redis_sentinel=mymaster';
|
||||||
RedisAdapter::createConnection($dsn);
|
RedisAdapter::createConnection($dsn);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user