summaryrefslogtreecommitdiff
path: root/tests/cluster
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cluster')
-rw-r--r--tests/cluster/cluster.tcl2
-rw-r--r--tests/cluster/tests/20-half-migrated-slot.tcl3
-rw-r--r--tests/cluster/tests/21-many-slot-migration.tcl2
-rw-r--r--tests/cluster/tests/includes/utils.tcl6
4 files changed, 12 insertions, 1 deletions
diff --git a/tests/cluster/cluster.tcl b/tests/cluster/cluster.tcl
index fb10fffcc..e95789282 100644
--- a/tests/cluster/cluster.tcl
+++ b/tests/cluster/cluster.tcl
@@ -174,4 +174,4 @@ proc wait_for_cluster_propagation {} {
} else {
fail "cluster config did not reach a consistent state"
}
-} \ No newline at end of file
+}
diff --git a/tests/cluster/tests/20-half-migrated-slot.tcl b/tests/cluster/tests/20-half-migrated-slot.tcl
index 69a90818c..e78867961 100644
--- a/tests/cluster/tests/20-half-migrated-slot.tcl
+++ b/tests/cluster/tests/20-half-migrated-slot.tcl
@@ -9,6 +9,7 @@ source "../tests/includes/utils.tcl"
test "Create a 2 nodes cluster" {
create_cluster 2 0
+ config_set_all_nodes cluster-allow-replica-migration no
}
test "Cluster is up" {
@@ -87,3 +88,5 @@ test "Half-finish importing" {
fix_cluster $nodefrom(addr)
assert_equal "xyz" [$cluster get aga]
}
+
+config_set_all_nodes cluster-allow-replica-migration yes
diff --git a/tests/cluster/tests/21-many-slot-migration.tcl b/tests/cluster/tests/21-many-slot-migration.tcl
index 18daff1d4..22020505c 100644
--- a/tests/cluster/tests/21-many-slot-migration.tcl
+++ b/tests/cluster/tests/21-many-slot-migration.tcl
@@ -9,6 +9,7 @@ source "../tests/includes/utils.tcl"
test "Create a 10 nodes cluster" {
create_cluster 10 0
+ config_set_all_nodes cluster-allow-replica-migration no
}
test "Cluster is up" {
@@ -54,3 +55,4 @@ test "Keys are accessible" {
}
}
+config_set_all_nodes cluster-allow-replica-migration yes
diff --git a/tests/cluster/tests/includes/utils.tcl b/tests/cluster/tests/includes/utils.tcl
index 43a2f2803..48c40a050 100644
--- a/tests/cluster/tests/includes/utils.tcl
+++ b/tests/cluster/tests/includes/utils.tcl
@@ -1,5 +1,11 @@
source "../../../tests/support/cli.tcl"
+proc config_set_all_nodes {keyword value} {
+ foreach_redis_id id {
+ R $id config set $keyword $value
+ }
+}
+
proc fix_cluster {addr} {
set code [catch {
exec ../../../src/redis-cli {*}[rediscli_tls_config "../../../tests"] --cluster fix $addr << yes