summaryrefslogtreecommitdiffstats
path: root/tests/unit/cluster/announced-endpoints.tcl
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-04 17:58:41 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-04 17:58:41 +0000
commitd7bc17f61954de2a29ab751e53ee1ce90d3a49e1 (patch)
treec9320c4588fc639b2c5aacf878edd67bccebfc57 /tests/unit/cluster/announced-endpoints.tcl
parentAdding upstream version 5:7.2.4. (diff)
downloadredis-upstream.tar.xz
redis-upstream.zip
Adding upstream version 5:7.2.5.upstream/5%7.2.5upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/unit/cluster/announced-endpoints.tcl')
-rw-r--r--tests/unit/cluster/announced-endpoints.tcl18
1 files changed, 13 insertions, 5 deletions
diff --git a/tests/unit/cluster/announced-endpoints.tcl b/tests/unit/cluster/announced-endpoints.tcl
index 941a8e0..becba22 100644
--- a/tests/unit/cluster/announced-endpoints.tcl
+++ b/tests/unit/cluster/announced-endpoints.tcl
@@ -1,8 +1,12 @@
start_cluster 2 2 {tags {external:skip cluster}} {
test "Test change cluster-announce-port and cluster-announce-tls-port at runtime" {
- set baseport [lindex [R 0 config get port] 1]
- set count [expr [llength $::servers] +1 ]
+ if {$::tls} {
+ set baseport [lindex [R 0 config get tls-port] 1]
+ } else {
+ set baseport [lindex [R 0 config get port] 1]
+ }
+ set count [expr [llength $::servers] + 1]
set used_port [find_available_port $baseport $count]
R 0 config set cluster-announce-tls-port $used_port
@@ -17,12 +21,16 @@ start_cluster 2 2 {tags {external:skip cluster}} {
R 0 config set cluster-announce-tls-port 0
R 0 config set cluster-announce-port 0
- assert_match "*:$baseport@*" [R 0 CLUSTER NODES]
+ assert_match "*:$baseport@*" [R 0 CLUSTER NODES]
}
test "Test change cluster-announce-bus-port at runtime" {
- set baseport [lindex [R 0 config get port] 1]
- set count [expr [llength $::servers] +1 ]
+ if {$::tls} {
+ set baseport [lindex [R 0 config get tls-port] 1]
+ } else {
+ set baseport [lindex [R 0 config get port] 1]
+ }
+ set count [expr [llength $::servers] + 1]
set used_port [find_available_port $baseport $count]
# Verify config set cluster-announce-bus-port