Skip to content

Commit 1c130c6

Browse files
committed
Test: cluster/base, check that we can write/read from cluster.
1 parent 3bc119c commit 1c130c6

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

tests/cluster/run.tcl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
cd tests/cluster
66
source cluster.tcl
77
source ../instances.tcl
8+
source ../../support/cluster.tcl ; # Redis Cluster client.
89

910
set ::instances_count 20 ; # How many instances we use at max.
1011

tests/cluster/tests/00-base.tcl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,15 @@ test "Nodes should report cluster_state is ok now" {
9494
}
9595
}
9696
}
97+
98+
test "It is possible to write and read from the cluster" {
99+
set port [get_instance_attrib redis 0 port]
100+
set cluster [redis_cluster 127.0.0.1:$port]
101+
for {set j 0} {$j < 100} {incr j} {
102+
$cluster set key.$j $j
103+
}
104+
for {set j 0} {$j < 100} {incr j} {
105+
assert {[$cluster get key.$j] eq $j}
106+
}
107+
$cluster close
108+
}

0 commit comments

Comments
 (0)