diff options
author | antirez <antirez@gmail.com> | 2014-05-02 16:37:12 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2014-05-02 16:37:12 +0200 |
commit | 1c130c6b037f9f2ec27ddf6da095d25deb3d6fa2 (patch) | |
tree | ba9f46d4d070de9792389f262e9b88caae7ccceb | |
parent | 3bc119c1558b1633f96050e2439057b7754136fc (diff) | |
download | redis-1c130c6b037f9f2ec27ddf6da095d25deb3d6fa2.tar.gz |
Test: cluster/base, check that we can write/read from cluster.
-rw-r--r-- | tests/cluster/run.tcl | 1 | ||||
-rw-r--r-- | tests/cluster/tests/00-base.tcl | 12 |
2 files changed, 13 insertions, 0 deletions
diff --git a/tests/cluster/run.tcl b/tests/cluster/run.tcl index 4c68828bb..7b7d014b8 100644 --- a/tests/cluster/run.tcl +++ b/tests/cluster/run.tcl @@ -5,6 +5,7 @@ cd tests/cluster source cluster.tcl source ../instances.tcl +source ../../support/cluster.tcl ; # Redis Cluster client. set ::instances_count 20 ; # How many instances we use at max. diff --git a/tests/cluster/tests/00-base.tcl b/tests/cluster/tests/00-base.tcl index 5097a049b..c3badb9b5 100644 --- a/tests/cluster/tests/00-base.tcl +++ b/tests/cluster/tests/00-base.tcl @@ -94,3 +94,15 @@ test "Nodes should report cluster_state is ok now" { } } } + +test "It is possible to write and read from the cluster" { + set port [get_instance_attrib redis 0 port] + set cluster [redis_cluster 127.0.0.1:$port] + for {set j 0} {$j < 100} {incr j} { + $cluster set key.$j $j + } + for {set j 0} {$j < 100} {incr j} { + assert {[$cluster get key.$j] eq $j} + } + $cluster close +} |