8000 Apply changes from PR #955 · jrtkcoder/phpredis@10b992b · GitHub
[go: up one dir, main page]

Skip to content

Commit 10b992b

Browse files
committed
Apply changes from PR phpredis#955
1 parent 8d90b02 commit 10b992b

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

.travis.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
sudo: required
22
language: php
33
php: 7.0
4-
services: redis-server
54
before_install: phpize
65
install: ./configure --prefix=/usr && sudo make install
7-
before_script: echo 'extension = redis.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
8-
script: php tests/TestRedis.php
6+
before_script:
7+
- gem install redis
8+
- mkdir -p tests/nodes/ && echo >> tests/nodes/nodemap
9+
- for PORT in $(seq 6379 6382); do redis-server --port $PORT --daemonize yes; done
10+
- for PORT in $(seq 7000 7011); do redis-server --port $PORT --cluster-enabled yes --cluster-config-file $PORT.conf --daemonize yes; echo 127.0.0.1:$PORT >> tests/nodes/nodemap; done
11+
- wget https://raw.githubusercontent.com/antirez/redis/unstable/src/redis-trib.rb
12+
- echo yes | ruby redis-trib.rb create --replicas 3 127.0.0.1:7000 127.0.0.1:7001 127.0.0.1:7002 127.0.0.1:7003 127.0.0.1:7004 127.0.0.1:7005 127.0.0.1:7006 127.0.0.1:7007 127.0.0.1:7008 127.0.0.1:7009 127.0.0.1:7010 127.0.0.1:7011
13+
- echo 'extension = redis.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
14+
script:
15+
- php tests/TestRedis.php --class Redis
16+
- php tests/TestRedis.php --class RedisArray
17+
- php tests/TestRedis.php --class RedisCluster

tests/RedisClusterTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function testReconnectSelect() { return $this->markTestSkipped(); }
3535

3636
/* Load our seeds on construction */
3737
public function __construct() {
38-
$str_nodemap_file = dirname(dirname($_SERVER['PHP_SELF'])) . '/nodes/nodemap';
38+
$str_nodemap_file = dirname($_SERVER['PHP_SELF']) . '/nodes/nodemap';
3939

4040
if (!file_exists($str_nodemap_file)) {
4141
fprintf(STDERR, "Error: Can't find nodemap file for seeds!\n");

0 commit comments

Comments
 (0)
0