26 Commits

Author SHA1 Message Date
michael-grunder
2828c2f187 Merge branch 'issue.1287' into develop 2018-01-25 10:59:40 -08:00
michael-grunder
84f1f28ba2 Implement SWAPDB command 2018-01-18 09:04:25 -08:00
michael-grunder
a0dc22220c Actually commit the cluster code to skip the exception test 2018-01-11 19:33:01 -08:00
michael-grunder
77aebadc73 Tests for doubling up on pipeline/multi calls 2017-08-14 15:06:57 -07:00
Alberto Fernández
058753e4c9 Fix Null Bulk String response parsing in cluster library (#1104)
* Failing test case when running LUA with bulk empty response
* Fix issue when parsing bulk array response from eval commands
* Added test for bulk LUA responses and changed condition
* Added multi tests and fixes in C code format
2017-02-09 14:56:34 +02:00
michael-grunder
6c1101f0e7 Test for calling connect multiple times on the same object 2017-01-02 17:54:01 -08:00
Pavlo Yatsukhnenko
a90bac2cff TravisCI: fix session test 2016-12-18 23:07:36 +02:00
Pavlo Yatsukhnenko
81d2cba557 TravisCI: session 2016-12-17 22:51:04 +02:00
michael-grunder
3a33700c28 Cluster geo commands and a generic so cluster and redis tests both work 2016-06-08 12:28:57 -07:00
michael-grunder
4336df3fee Fix bug in random key cluster test 2016-06-02 09:14:01 -07:00
michael-grunder
622709f311 Added a test for 'raw' commands 2015-05-07 18:12:52 -07:00
michael-grunder
ab8fa7dad7 Use a static variable for our nodemap file and only open it once
to avoid blowing file descriptors.
2015-05-07 15:52:55 -07:00
michael-grunder
ed7e10d621 Added cluster specific test for SCAN 2015-05-05 15:19:30 -07:00
michael-grunder
1725fccf40 Properly handle CLIENT variants :-) 2015-05-05 15:19:29 -07:00
michael-grunder
260852f562 Fix INFO command so it works in a MULTi EXEC block 2015-05-05 15:18:02 -07:00
michael-grunder
08ecec92a3 Unit test suite improvements and cluster failover test
* Added a test specifically for RedisCluster to test slave failover
  settings.
* Added an option to specifically disable colorization, as well as
  a mechanism to determine if the output is being piped, such that
  we can turn colorization off in that case as well.
2015-05-05 15:18:02 -07:00
michael-grunder
7ef7d07854 A few minor cluster and unit test fixes
* Fixed getLastError() to look at redisCluster->err, rather than flags
* Fixed serialization bug for zipstr multibulk processing
* Added specific RedisClusterTest tests for SCRIPT and EVALSHA commands

All unit tests passing now!  \o/
2015-05-05 15:16:50 -07:00
michael-grunder
7a106d51d6 Response handler fixes
* Fixed serialization for various multi-bulk responses
* Properly handle NULL BULK replies for variant replies
2015-05-05 15:16:50 -07:00
michael-grunder
469e8e9377 Various cluster fixes and Unit test updates
* Updated the unit test suite to print each unit test method name we're
  running as we do so, and also with fancy colors :-)
* Added functionality to handle failed transactions, where Redis will send
  us a multi bulk length of -1.  This can happen because of an EXECABORT
  error, or because a watched key was modified during the transaction
* Initialize serialized return value to NULL to avoid segfault
* use strtol not atoi in our long response handler, to handle large values
* Fixed our return value in multi responses
* Fiexed type() command as cluster doesn't still have the '+' prefix when
  checking for what TYPE returns
* Exists should return a BOOLEAN not 1/0
* Fixed sRandMember to work in the context of a MULTI block
* Use "LINDEX" not "LGET" as "LGET" isn't a valid Redis command
* Properly set our slot for the PFCOUNT command
* Many unit test changes such that Redis and RedisCluster are happy using
  mostly the same ones.
2015-05-05 15:16:49 -07:00
michael-grunder
9b68c33f7a More unit test cleanup and key consolidation for multiple key commands 2015-05-05 15:16:49 -07:00
michael-grunder
88530eed4a Add cluster specific testInfo() method 2015-05-05 15:16:49 -07:00
michael-grunder
501561b255 More unit test formatting, and key renaming so tests work in cluster 2015-05-05 15:16:49 -07:00
michael-grunder
6205504405 Unit test formatting, change to actual Redis commands. 2015-05-05 15:16:49 -07:00
michael-grunder
968ba49fa7 More unit test integration with cluster 2015-05-05 15:16:49 -07:00
michael-grunder
0b269cbb72 More RedisCluster fixes
* Properly handle single array as well as variadic arguments for
  things like RedisCluster::del
* Wrapping keys in {} such that Redis and RedisCluster tests can
  use the same methods (avoiding CROSSSLOT).
* Fixed a double-free scenerio in redis_array_impl.c
2015-05-05 15:16:49 -07:00
michael-grunder
79cb6a8905 Initial commit reworking unit tests
This commit reworks the unit tests such that all three classes
(Redis, RedisArray, and RedisCluster) can be tested using the
TestRedis.php script.

Now, when running TestRedis.php an option can be passed for which
part of phpredis we would like to test (defaults to Redis).
2015-05-05 15:07:43 -07:00